From: Simon Marlow Date: Fri, 17 Mar 2006 15:07:52 +0000 (+0000) Subject: forkProcess(): watch out for ThreadRelocated X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e6218fe7eff4e34e1a3c823cd4b7aebe09d2d4fb;p=ghc-hetmet.git forkProcess(): watch out for ThreadRelocated --- diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index bbc6a8b..39aa5e2 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -2149,11 +2149,15 @@ forkProcess(HsStablePtr *entry // now gone. for (t = all_threads; t != END_TSO_QUEUE; t = next) { - next = t->global_link; - // don't allow threads to catch the ThreadKilled - // exception, but we do want to raiseAsync() because these - // threads may be evaluating thunks that we need later. - deleteThread_(cap,t); + if (t->what_next == ThreadRelocated) { + next = t->link; + } else { + next = t->global_link; + // don't allow threads to catch the ThreadKilled + // exception, but we do want to raiseAsync() because these + // threads may be evaluating thunks that we need later. + deleteThread_(cap,t); + } } // Empty the run queue. It seems tempting to let all the