diff --git a/crates/engine/tree/src/tree/payload_processor/mod.rs b/crates/engine/tree/src/tree/payload_processor/mod.rs index 42d0b09d05..214597f620 100644 --- a/crates/engine/tree/src/tree/payload_processor/mod.rs +++ b/crates/engine/tree/src/tree/payload_processor/mod.rs @@ -565,7 +565,7 @@ where let parent_span = Span::current(); self.executor.spawn_blocking_named("sparse-trie", move || { - reth_tasks::once!(increase_thread_priority()); + reth_tasks::once!(increase_thread_priority); let _enter = debug_span!(target: "engine::tree::payload_processor", parent: parent_span, "sparse_trie_task") .entered(); diff --git a/crates/tasks/src/utils.rs b/crates/tasks/src/utils.rs index 74dba9c610..f535922bc2 100644 --- a/crates/tasks/src/utils.rs +++ b/crates/tasks/src/utils.rs @@ -2,7 +2,7 @@ pub use thread_priority::{self, *}; -/// Runs the given expression exactly once per call site. +/// Runs the given closure exactly once per call site. /// /// Each invocation expands to its own `static Once`, so two `once!` calls in the same function /// are independent. Useful for one-time thread setup (priority, affinity) on threads that may @@ -11,7 +11,7 @@ pub use thread_priority::{self, *}; macro_rules! once { ($e:expr) => {{ static ONCE: std::sync::Once = std::sync::Once::new(); - ONCE.call_once(|| $e); + ONCE.call_once($e); }}; }