FFI and Concurrency

2003-04-03 Thread Ahn Ki-yung
C call blocks the whole process, and Concurret module become meaningless. Isn't there any library or wrapper that can avoid ccall from blocking entire process ? -- Ahn Ki-yung ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell

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