diff options
| -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) |