rtsBool retry;
nat i = 0;
- if (!emptyRunQueue(cap)) {
+ if (!emptyRunQueue(cap) || cap->returning_tasks_hd != NULL) {
// If there are other threads, don't try to run any new
// sparks: sparks might be speculative, we don't want to take
// resources away from the main computation.
cap->free_trec_headers = NO_TREC;
cap->transaction_tokens = 0;
cap->context_switch = 0;
+ cap->pinned_object_block = NULL;
}
/* ---------------------------------------------------------------------------
freeCapability (Capability *cap)
{
stgFree(cap->mut_lists);
+ stgFree(cap->saved_mut_lists);
#if defined(THREADED_RTS)
freeSparkPool(cap->sparks);
#endif