From 8ca564832896700916b6d19e007eda361c075fc6 Mon Sep 17 00:00:00 2001 From: romir kulshrestha Date: Wed, 4 Mar 2026 19:06:59 +0100 Subject: fix ordering bug --- oryxc/src/compiler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'oryxc') diff --git a/oryxc/src/compiler.rs b/oryxc/src/compiler.rs index 355b496..5a16356 100644 --- a/oryxc/src/compiler.rs +++ b/oryxc/src/compiler.rs @@ -144,7 +144,7 @@ fn worker_loop( stealers: Arc<[Stealer]>, ) { loop { - if state.njobs.load(Ordering::Relaxed) == 0 { + if state.njobs.load(Ordering::Acquire) == 0 { break; } @@ -202,7 +202,7 @@ fn worker_loop( }, } - state.njobs.fetch_sub(1, Ordering::Relaxed); + state.njobs.fetch_sub(1, Ordering::Release); } } -- cgit v1.2.3