summaryrefslogtreecommitdiff
path: root/oryxc/src/compiler.rs
diff options
context:
space:
mode:
authorromir kulshrestha <romir.kulshrestha@gmail.com> 2026-03-04 19:06:59 +0100
committerromir kulshrestha <romir.kulshrestha@gmail.com> 2026-03-04 19:06:59 +0100
commit8ca564832896700916b6d19e007eda361c075fc6 (patch)
tree36430b2f6bcdcbe5958720a14e47a020f49d81a6 /oryxc/src/compiler.rs
parent0ab2106660280050f5b527ca58c5d673a43980d6 (diff)
fix ordering bug
Diffstat (limited to 'oryxc/src/compiler.rs')
-rw-r--r--oryxc/src/compiler.rs4
1 files changed, 2 insertions, 2 deletions
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<Job>]>,
) {
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);
}
}