summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-01-06 15:32:54 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-01-06 15:32:54 +0000
commitf31b2a4a57473ca78fe1b9a1b7cd11f22aeff87d (patch)
treee31c083075913e796610fafcadb44f98b368c3c0
parent27fcc50d92b4490fa638950f813d8a3ba530e6a1 (diff)
downloadhaskell-f31b2a4a57473ca78fe1b9a1b7cd11f22aeff87d.tar.gz
wake up the blocked exception queue on ThreadFinished; fixes #2910
-rw-r--r--rts/Schedule.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 38e3a3c2ce..7c453d7d28 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -1402,6 +1402,13 @@ scheduleHandleThreadFinished (Capability *cap STG_UNUSED, Task *task, StgTSO *t)
debugTrace(DEBUG_sched, "--++ thread %lu (%s) finished",
(unsigned long)t->id, whatNext_strs[t->what_next]);
+ // blocked exceptions can now complete, even if the thread was in
+ // blocked mode (see #2910). The thread is already marked
+ // ThreadComplete, so any further throwTos will complete
+ // immediately and we don't need to worry about synchronising with
+ // those.
+ awakenBlockedExceptionQueue (cap, t);
+
//
// Check whether the thread that just completed was a bound
// thread, and if so return with the result.