X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FSchedule.c;h=38e3a3c2ce2d8b27cb28db93895fe1e872ebc3f5;hp=33715b1ecd55ef2baac3818b59c7c502989ecaf2;hb=0bff4d75254dabb2c002eace2252a4480bf8474e;hpb=d779cca065e2059d300928b0d547798f36afb073 diff --git a/rts/Schedule.c b/rts/Schedule.c index 33715b1..38e3a3c 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -777,9 +777,11 @@ schedulePushWork(Capability *cap USED_IF_THREADS, // Check whether we have more threads on our run queue, or sparks // in our pool, that we could hand to another Capability. - if ((emptyRunQueue(cap) || cap->run_queue_hd->_link == END_TSO_QUEUE) - && sparkPoolSizeCap(cap) < 2) { - return; + if (cap->run_queue_hd == END_TSO_QUEUE) { + if (sparkPoolSizeCap(cap) < 2) return; + } else { + if (cap->run_queue_hd->_link == END_TSO_QUEUE && + sparkPoolSizeCap(cap) < 1) return; } // First grab as many free Capabilities as we can.