From: simonmar Date: Wed, 2 Nov 2005 13:04:55 +0000 (+0000) Subject: [project @ 2005-11-02 13:04:55 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~87 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=db2468da1dfdfca286f8ae017656ed7115a77480;p=ghc-hetmet.git [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. --- 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 {