diff options
| author | romir kulshrestha <romir.kulshrestha@gmail.com> | 2026-03-04 19:06:59 +0100 |
|---|---|---|
| committer | romir kulshrestha <romir.kulshrestha@gmail.com> | 2026-03-04 19:06:59 +0100 |
| commit | 8ca564832896700916b6d19e007eda361c075fc6 (patch) | |
| tree | 36430b2f6bcdcbe5958720a14e47a020f49d81a6 /oryxc | |
| parent | 0ab2106660280050f5b527ca58c5d673a43980d6 (diff) | |
fix ordering bug
Diffstat (limited to 'oryxc')
| -rw-r--r-- | oryxc/src/compiler.rs | 4 |
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); } } |