Re: How is non-blocking IO working ?

2003-04-03 Thread Alastair Reid
Ahn Ki-yung <[EMAIL PROTECTED]> writes: > Document says GHC uses non-blocking IO to be thread friendly. > [...] > How is non-blocking and thread working ? I can't understand. This is usually implemented using 'select' (see attached man page). In a multithreaded program where you have user-lev

How is non-blocking IO working ?

2003-04-03 Thread Ahn Ki-yung
Document says GHC uses non-blocking IO to be thread friendly. But if it continues to poll on the non blocking file descriptor. It should cost much CPU load, but actually it doesn't : for example if a server is wating an input from a connected client, say using hGetLine, until input comes in from th