30 Apr
2010
30 Apr
'10
8:46 a.m.
On Thu, 2010-04-29 at 18:26 -0400, Aran Donohue wrote:
Hi Cafe,
In GHC, if a thread spawned by forkIO blocks on some network or disk IO, is the threading system smart enough not to wake the thread until an IO event occurs on its input/output? The Control.Concurrent documentation doesn't specify, and the previous discussions I could find on this topic are out-of-date. There is a years-old GHC ticket, too, recently revived[2].
Put another way, is it possible yet to use forkIO for making a server to handle tens of thousands of concurrent network connections? If not, what is the best current Haskell/GHC way?
Thanks, Aran
IIRC yes - they explicitly waits for read (waitForRead or something like that) on GHC. Regards