[Haskell-cafe] STM, IO and event loops
joelr1 at gmail.com
Mon Nov 28 06:47:25 EST 2005
On Nov 28, 2005, at 11:32 AM, Simon Marlow wrote:
> On Unix with -threaded, all blocking I/O using Handles or sockets goes
> via the I/O manager thread, which multiplexes all the blocked I/O
> requests into a single select() call. If you have 20k blocked socket
> reads, there will be 20k lightweight Haskell threads, and probably
> 2 or
> 3 real OS threads. Without -threaded the outcome is pretty much the
> same, except the runtime does the select().
I'm not well-versed on the differences between select in the I/O
manager and the runtime. What is the difference? Should I just plug -
threaded into my cabal file and not worry about it? How big of an
impact is select() in the runtime?
> On Windows, unfortunately you'll get 20k OS threads for this scenario
> (regardless of -threaded), because we haven't implemented the I/O
> manager on Windows yet.
I will dump Windows any day.
More information about the Haskell-Cafe