
3 Apr
2003
3 Apr
'03
11:25 a.m.
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 the network it should continue to poll until it succeeds to get some messages. But this does not seem to happen, if I look at the prcessor activity using 'top'. It does not consume CPU same as a blocked processed by blocked IO. How is non-blocking and thread working ? I can't understand.