diff --git a/tokio/src/runtime/scheduler/multi_thread/worker.rs b/tokio/src/runtime/scheduler/multi_thread/worker.rs index cfee421bd..91fecedbf 100644 --- a/tokio/src/runtime/scheduler/multi_thread/worker.rs +++ b/tokio/src/runtime/scheduler/multi_thread/worker.rs @@ -1017,7 +1017,10 @@ impl Worker { .idle .notify_mult(synced, &mut self.workers_to_notify, num); - debug_assert!(self.workers_to_notify.is_empty()); + // Notify any workers + for worker in self.workers_to_notify.drain(..) { + cx.shared().condvars[worker].notify_one() + } } } diff --git a/tokio/src/runtime/tests/mod.rs b/tokio/src/runtime/tests/mod.rs index b12a76e26..56699998c 100644 --- a/tokio/src/runtime/tests/mod.rs +++ b/tokio/src/runtime/tests/mod.rs @@ -63,7 +63,7 @@ cfg_loom! { // Make sure debug assertions are enabled #[cfg(not(debug_assertions))] - compiler_error!("these tests require debug assertions to be enabled"); + compile_error!("these tests require debug assertions to be enabled"); } cfg_not_loom! {