Problems interrupting IO with -threaded

Simon Marlow marlowsd at
Wed Jun 11 03:02:55 EDT 2008

Brandon S. Allbery KF8NH wrote:
> On 2008 Jun 11, at 0:43, Simon Marlow wrote:
>> Unix semantics just isn't the right thing when it comes to 
>> non-blocking I/O.  If only there were non-blocking read()/write() 
>> system calls, we'd be fine.
> Have you considered using aio_read() and company?

aio is not exactly the right API either.  The IO manager would have to 
call aio_suspend(), and then in order to receive events from the RTS 
over the special pipe we have set up, the IO manager would have to issue 
its own aio_read() on this FD.  And I'm not sure whether you can use 
aio_suspend() to wait for network accept(), but I suspect not.  There 
ought to be a single way to wait for various different types of event on 


More information about the Glasgow-haskell-users mailing list