From db2468da1dfdfca286f8ae017656ed7115a77480 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 2 Nov 2005 13:04:55 +0000 Subject: [PATCH 1/1] [project @ 2005-11-02 13:04:55 by simonmar] when shutting down, don't allow a worker to exit until the run queue is empty, because the thread in exitScheduler() is waiting for this. --- ghc/rts/Schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 15d2181..d8cee87 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -417,7 +417,7 @@ schedule (Capability *initialCapability, Task *task) // If we are a worker, just exit. If we're a bound thread // then we will exit below when we've removed our TSO from // the run queue. - if (task->tso == NULL) { + if (task->tso == NULL && emptyRunQueue(cap)) { return cap; } } else { -- 1.7.10.4