[project @ 2004-10-14 14:58:50 by simonmar]
authorsimonmar <unknown>
Thu, 14 Oct 2004 14:58:51 +0000 (14:58 +0000)
committersimonmar <unknown>
Thu, 14 Oct 2004 14:58:51 +0000 (14:58 +0000)
commitaf7a1e96efe4aa3f10cbd29e9989a7fc695d7ff9
treed29c4d3655761b66d63512089f65cf4b55f9311a
parentb6cbe4e36af5a486678e4622839dcef2aa487cc7
[project @ 2004-10-14 14:58:50 by simonmar]
Threaded RTS improvements:

 - Unix only: implement waitRead#, waitWrite# and delay# in Haskell,
   by having a single Haskell thread (the IO manager) performing a blocking
   select() operation.  Threads communicate with the IO manager
   via channels.  This is faster than doing the select() in the RTS,
   because we only restart the select() when a new request arrives,
   rather than each time around the scheduler.

   On Windows we just make blocking IO calls, we don't have a fancy IO
   manager (yet).

 - Simplify the scheduler for the threaded RTS, now that we don't have
   to wait for IO in the scheduler loop.

 - Remove detectBlackHoles(), which isn't used now (not sure how long
   this has been unused for... perhaps it was needed back when main threads
   used to be GC roots, so we had to check for blackholes manually rather
   than relying on the GC.)

Signals aren't quite right in the threaded RTS.  In fact, they're
slightly worse than before, because the thread receiving signals might
be blocked in a C call - previously there always be another thread
stuck in awaitEvent() that would notice the signal, but that's not
true now.  I can't see an easy fix yet.
GHC/Conc.lhs
cbits/selectUtils.c [new file with mode: 0644]
include/HsBase.h