[project @ 2002-12-10 13:38:40 by wolfgang]
Fix a race condition/possible deadlock in the threaded rts: If a callback into haskell finished before waitThread_() was called, the signal was lost ans waitThread_() waited indefinitely. Solution: Don't release the sched_mutex between calls to scheduleThread_ and waitThread_. Please note that the scheduler API function waitThread is still possibly affected by this race condition. It's used in rts_mainEvalIO (I think that's safe) and in finishAllThreads (this looks dangerous, but finishAllThreads is never used).
Showing with 10 additions and 12 deletions