Commit 8a1f533a authored by Simon Marlow's avatar Simon Marlow

findSpark: exit if there's a returning foreign call

parent 218c7fe5
......@@ -77,7 +77,7 @@ findSpark (Capability *cap)
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.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment