
5 Oct
2004
5 Oct
'04
12:53 p.m.
On 03 October 2004 19:34, Peter Simons wrote:
I have another I/O problem. I need to time out when a Handle blocks forever. I am using hWaitForInput anyway, so that shouldn't be a problem, but the documentation says that using this feature will block all IO threads? Is it much work to fix this? I _could_ forkIO a racer thread myself, of course, but it feels wrong to do that around a function that has an explicit timeout argument. :-)
I've fixed it so it'll work in the threaded RTS. However, forking a Haskell thread to do the threadDelay might still be quicker. In the unthreaded RTS there isn't an easy fix, I'm afraid. The reason is that we don't currently have a way to block a thread on both I/O *and* a timeout. Cheers, Simon
7667
Age (days ago)
7667
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow