Commit 0bff4d75 authored by Simon Marlow's avatar Simon Marlow

wake up other Capabilities even when there is only one spark (see #2868)

parent d779cca0
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment