diff options
| author | romir kulshrestha <romir.kulshrestha@gmail.com> | 2026-03-04 21:34:00 +0100 |
|---|---|---|
| committer | romir kulshrestha <romir.kulshrestha@gmail.com> | 2026-03-04 21:36:59 +0100 |
| commit | e6bf313e419592860ed5087cb76f1261e7a7060c (patch) | |
| tree | 7b40a811e1314790c44e845241a1b87ad6ab50f9 /oryxc/src | |
| parent | 1e279d416bf8e87e2f1d35a455bd5738bf19d9da (diff) | |
race condition fix
Diffstat (limited to 'oryxc/src')
| -rw-r--r-- | oryxc/src/compiler.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/oryxc/src/compiler.rs b/oryxc/src/compiler.rs index c30dbce..4ae8577 100644 --- a/oryxc/src/compiler.rs +++ b/oryxc/src/compiler.rs @@ -171,6 +171,10 @@ where handles.iter().map(|h| h.thread().clone()).collect(); let _ = state.worker_threads.set(worker_threads); + // if work completes before we get here, wake them so they can observe the + // termination condition and exit. + state.wake_all(); + for h in handles { if let Err(e) = h.join() { std::panic::resume_unwind(e) |