// Wipe our spare workers list, they no longer exist. New
// workers will be created if necessary.
cap->spare_workers = NULL;
- cap->returning_tasks_hd = NULL;
+ cap->n_spare_workers = 0;
+ cap->returning_tasks_hd = NULL;
cap->returning_tasks_tl = NULL;
#endif
traceEventRunThread(cap, tso);
+ /* Reset blocking status */
+ tso->why_blocked = NotBlocked;
+
if ((tso->flags & TSO_BLOCKEX) == 0) {
// avoid locking the TSO if we don't have to
if (tso->blocked_exceptions != END_BLOCKED_EXCEPTIONS_QUEUE) {
- awakenBlockedExceptionQueue(cap,tso);
+ maybePerformBlockedException(cap,tso);
}
}
- /* Reset blocking status */
- tso->why_blocked = NotBlocked;
-
cap->r.rCurrentTSO = tso;
cap->in_haskell = rtsTrue;
errno = saved_errno;