Waiting on Sockets or File Descriptors

Carsten Schultz carsten at codimi.de
Wed Feb 2 10:39:14 EST 2005


On Wed, Feb 02, 2005 at 02:57:24PM +0100, Peter Simons wrote:
> Tomasz Zielonka writes:
>  >     threadWaitRead :: Int -> IO ()
>  >     threadWaitWrite :: Int -> IO ()
> Thanks for the pointer!
> Am I correct in assuming that there is no "more high-level"
> mechanism for scheduling more than one file descriptor? Like
> select(2) or poll(2) would do?

Well, I *guess* that this is exactly what GHC will do internally.  And
I seem to dimly remember a what-is-more-high-level-discussion here,
but it may have been on a different topic ;-)

Just do an strace, if you want to know (and are running Linux).

Take care,


Carsten Schultz (2:38, 33:47)
PGP/GPG key on the pgp.net key servers, 
fingerprint on my home page.

More information about the Glasgow-haskell-users mailing list