Proposal: System.Timeout module for base (Trac #980)

Simon Marlow simonmarhaskell at gmail.com
Thu Mar 1 07:05:51 EST 2007


Bayley, Alistair wrote:
>> Bayley, Alistair writes:
>>
>>  > In my experience, when run with -threaded, Network.Socket.accept
>>  > does block, and async exceptions are not delivered (I'm using
>>  > GHC-6.6 on Win XP).
>>
>> Oh. That's bad news. I don't think the socket configuration has
>> anything to do with it, this seems to be an RTS decision. The truth
>> is, however, I really don't know. Can someone else shed some light on
>> this matter?
>>
>> Peter
> 
> Well, I have a fairly simple test case, if anyone wants to see it.

This is a Windows-specific bug.  In fact all I/O on Windows in the threaded RTS 
is currently done with blocking foreign calls, so you won't be able to kill any 
threads blocked on I/O I'm afraid.  In the non-threaded RTS you can kill the 
Haskell thread, but the I/O will still happen (actually I think this is worse 
than the -threaded behaviour).

We'd like to do all I/O using an I/O manager thread, as we do on Unix.  If there 
are any Windows experts listening, this is a 1-2 day task that would have great 
benefit to Windows users.

Cheers,
	Simon


More information about the Libraries mailing list