diff --git a/src/artifact_cache/artifact_cache.c b/src/artifact_cache/artifact_cache.c index 2993b3be..6733f213 100644 --- a/src/artifact_cache/artifact_cache.c +++ b/src/artifact_cache/artifact_cache.c @@ -340,13 +340,17 @@ ac_async_tick(void) AC_Request *r = &task->wide[idx]; // rjf: any new higher priority tasks? -> cancel - if(task_idx == 1 && idx != 0) MutexScope(ac_shared->req_batches[0].mutex) + if(lane_idx() == 0) { - if(ac_shared->req_batches[0].wide_count != 0 || ac_shared->req_batches[0].thin_count != 0) + if(task_idx == 1 && idx != 0) MutexScope(ac_shared->req_batches[0].mutex) { - ins_atomic_u64_eval_assign(cancelled_ptr, 1); + if(ac_shared->req_batches[0].wide_count != 0 || ac_shared->req_batches[0].thin_count != 0) + { + ins_atomic_u64_eval_assign(cancelled_ptr, 1); + } } } + lane_sync(); // rjf: cancelled? -> exit if(ins_atomic_u64_eval(cancelled_ptr)) diff --git a/src/dbg_info/dbg_info2.c b/src/dbg_info/dbg_info2.c index 7ada292f..84c1e75a 100644 --- a/src/dbg_info/dbg_info2.c +++ b/src/dbg_info/dbg_info2.c @@ -1401,6 +1401,7 @@ di2_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out) artifact.u64[3] = match.idx; } + lane_sync(); scratch_end(scratch); return artifact; }