summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-03-17 15:07:52 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-03-17 15:07:52 +0000
commite6218fe7eff4e34e1a3c823cd4b7aebe09d2d4fb (patch)
tree27aeeea07e00f419aa0e6d388dee50e41925fa4c /ghc
parentdf85c4b4a403c1e17d3f79fe91109ffbe6ba60b7 (diff)
downloadhaskell-e6218fe7eff4e34e1a3c823cd4b7aebe09d2d4fb.tar.gz
forkProcess(): watch out for ThreadRelocated
Diffstat (limited to 'ghc')
-rw-r--r--ghc/rts/Schedule.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c
index bbc6a8b5a8..39aa5e28ae 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