From 8a1f533adf691a008ba2ffd0487f9b9254517020 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 9 Oct 2009 15:29:20 +0000 Subject: [PATCH] findSpark: exit if there's a returning foreign call --- rts/Capability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/Capability.c b/rts/Capability.c index 8cfcba0..9294949 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -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. -- 1.7.10.4