Commit e6218fe7 authored by Simon Marlow's avatar Simon Marlow
Browse files

forkProcess(): watch out for ThreadRelocated

parent df85c4b4
...@@ -2149,11 +2149,15 @@ forkProcess(HsStablePtr *entry ...@@ -2149,11 +2149,15 @@ forkProcess(HsStablePtr *entry
// now gone. // now gone.
for (t = all_threads; t != END_TSO_QUEUE; t = next) { for (t = all_threads; t != END_TSO_QUEUE; t = next) {
next = t->global_link; if (t->what_next == ThreadRelocated) {
// don't allow threads to catch the ThreadKilled next = t->link;
// exception, but we do want to raiseAsync() because these } else {
// threads may be evaluating thunks that we need later. next = t->global_link;
deleteThread_(cap,t); // 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 // Empty the run queue. It seems tempting to let all the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment