diff options
Diffstat (limited to 'rts/RaiseAsync.c')
-rw-r--r-- | rts/RaiseAsync.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c index 628dff8ce8..3cfb4504ae 100644 --- a/rts/RaiseAsync.c +++ b/rts/RaiseAsync.c @@ -436,6 +436,18 @@ check_target: } #endif + case ThreadMigrating: + // if is is ThreadMigrating and tso->cap is ours, then it + // *must* be migrating *to* this capability. If it were + // migrating away from the capability, then tso->cap would + // point to the destination. + // + // There is a MSG_WAKEUP in the message queue for this thread, + // but we can just do it preemptively: + tryWakeupThread(cap, target); + // and now retry, the thread should be runnable. + goto retry; + default: barf("throwTo: unrecognised why_blocked value"); } |