-
wolfgang authored
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).
8a8eee36