From f4f3f509ac3e7a7f2fdf3a3dd19200d5bdea84f0 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Wed, 17 May 2023 10:13:13 -0700 Subject: [PATCH] try loom again --- tokio/src/runtime/scheduler/multi_thread/worker.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tokio/src/runtime/scheduler/multi_thread/worker.rs b/tokio/src/runtime/scheduler/multi_thread/worker.rs index bb82d8114..1bd2e280c 100644 --- a/tokio/src/runtime/scheduler/multi_thread/worker.rs +++ b/tokio/src/runtime/scheduler/multi_thread/worker.rs @@ -642,8 +642,12 @@ impl Core { /// a new worker will actually try to steal. The idea is to make sure not all /// workers will be trying to steal at the same time. fn steal_work(&mut self, worker: &Worker) -> Option { + #[cfg(not(loom))] const ATTEMPTS: usize = 4; + #[cfg(loom)] + const ATTEMPTS: usize = 1; + // Number of remotes let num = worker.handle.shared.remotes.len();