Commit d1b9d679 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

rts/Capability: Use relaxed load in findSpark

When checking n_returning_tasks.
parent 83ac5594
Pipeline #29707 failed with stages
in 420 minutes and 21 seconds
......@@ -99,7 +99,8 @@ findSpark (Capability *cap)
bool retry;
uint32_t i = 0;
if (!emptyRunQueue(cap) || cap->n_returning_tasks != 0) {
// This is an approximate check so relaxed load is acceptable here.
if (!emptyRunQueue(cap) || RELAXED_LOAD(&cap->n_returning_tasks) != 0) {
// 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
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