From: simonmar Date: Wed, 26 Oct 2005 11:41:51 +0000 (+0000) Subject: [project @ 2005-10-26 11:41:51 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~129 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=48d21c1fbdf9cf032a528e19195714229530a632;p=ghc-hetmet.git [project @ 2005-10-26 11:41:51 by simonmar] fix to previous change: allow workers to exit --- diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index fe50cd4..a7696ed 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -408,6 +408,12 @@ schedule (Capability *initialCapability, Task *task) deleteRunQueue(cap); if (shutting_down_scheduler) { IF_DEBUG(scheduler, sched_belch("shutting down")); + // 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) { + return cap; + } } else { IF_DEBUG(scheduler, sched_belch("interrupted")); }