[project @ 2003-10-01 10:49:07 by wolfgang]
authorwolfgang <unknown>
Wed, 1 Oct 2003 10:49:09 +0000 (10:49 +0000)
committerwolfgang <unknown>
Wed, 1 Oct 2003 10:49:09 +0000 (10:49 +0000)
commit324e96d2ebfcb113cd97c43ef043d591ef87de71
treeb5b38d8ec16bc56010132ef73710577e85122952
parentaefc6956f4828708e1343cf4858296fc3141a176
[project @ 2003-10-01 10:49:07 by wolfgang]
Threaded RTS:
Don't start new worker threads earlier than necessary.
After this commit, a Haskell program that uses neither forkOS nor forkIO is
really single-threaded (rather than using two OS threads internally).

Some details:
Worker threads are now only created when a capability is released, and
only when
(there are no worker threads)
&& (there are runnable Haskell threads ||
    there are Haskell threads blocked on IO or threadDelay)
awaitEvent can now be called from bound thread scheduling loops
(so that we don't have to create a worker thread just to run awaitEvent)
ghc/rts/Capability.c
ghc/rts/Capability.h
ghc/rts/RtsAPI.c
ghc/rts/Schedule.c
ghc/rts/Schedule.h
ghc/rts/Select.c
ghc/rts/Task.c
ghc/rts/Task.h