diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2026-03-05 22:00:07 +0100 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2026-03-05 22:00:07 +0100 |
| commit | 3840127a3de315fa2a2471ddf1e23575f2608373 (patch) | |
| tree | d7a960b64e99b602e2420b8fe2033cf4bb42d494 /oryxc/src/compiler.rs | |
| parent | 4f723801d751d520263ce0f14b2cf409f60ac77e (diff) | |
Simplify code
Diffstat (limited to 'oryxc/src/compiler.rs')
| -rw-r--r-- | oryxc/src/compiler.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/oryxc/src/compiler.rs b/oryxc/src/compiler.rs index a9119bc..dffb941 100644 --- a/oryxc/src/compiler.rs +++ b/oryxc/src/compiler.rs @@ -244,15 +244,12 @@ fn worker_loop( stealers: Arc<[Stealer<Job>]>, ) { loop { - if state.njobs.load(Ordering::Acquire) == 0 { - break; - } - let Some(job) = find_task(&queue, &state.globalq, &stealers) else { - // no work available; check termination condition before parking to - // avoid missed wakeups + /* No work available; check termination condition before + * parking to avoid missed wakeups */ if state.njobs.load(Ordering::Acquire) == 0 { - break; + state.wake_all(); + return; } thread::park(); continue; |