summaryrefslogtreecommitdiff
path: root/rts/win32
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-11 15:45:59 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-11 15:45:59 +0000
commitc5e9e31045f8f96a87c0d0793af33cb83c3da5d7 (patch)
treef73489d6e730f9d5a7e9850499b9eb4188df1059 /rts/win32
parent2ad5ee9e84b9fb2c7df76309c59e23f938632ae9 (diff)
downloadhaskell-c5e9e31045f8f96a87c0d0793af33cb83c3da5d7.tar.gz
avoid a crash: don't return unless the run queue has some threads in it
Diffstat (limited to 'rts/win32')
-rw-r--r--rts/win32/AwaitEvent.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/rts/win32/AwaitEvent.c b/rts/win32/AwaitEvent.c
index 2175626313..1b92c4386f 100644
--- a/rts/win32/AwaitEvent.c
+++ b/rts/win32/AwaitEvent.c
@@ -45,14 +45,11 @@ awaitEvent(rtsBool wait)
return;
}
- if (!ret) {
- return; /* still hold the lock */
- }
-
- // Return to the scheduler if:
+ // The return value from awaitRequests() is a red herring: ignore
+ // it. Return to the scheduler if !wait, or
//
// - we were interrupted
- // - new threads have arrived
+ // - the run-queue is now non- empty
} while (wait
&& sched_state == SCHED_RUNNING