From 152d4fc89914de8509f9e44c0bef567a45a9efd9 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 13 Jun 2023 13:14:10 -0700 Subject: [PATCH] wip --- tokio/src/runtime/scheduler/multi_thread/worker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/src/runtime/scheduler/multi_thread/worker.rs b/tokio/src/runtime/scheduler/multi_thread/worker.rs index 0c741cc36..cfee421bd 100644 --- a/tokio/src/runtime/scheduler/multi_thread/worker.rs +++ b/tokio/src/runtime/scheduler/multi_thread/worker.rs @@ -515,8 +515,7 @@ fn run( // the worker core is lost due to `block_in_place()` being called from // within the task. if !cx.defer.borrow().is_empty() { - // cx.defer.wake(); - todo!() + worker.schedule_deferred_without_core(&cx, &mut cx.shared().synced.lock()); } }); }); @@ -1213,6 +1212,7 @@ impl Worker { fn can_transition_to_parked(&self, cx: &Context, core: &mut Core) -> bool { cx.shared().remotes[core.index].lifo_slot.is_none() && core.run_queue.is_empty() + && !core.is_shutdown && !core.is_traced }