mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
refactor: use spawn_blocking_named for remaining unnamed blocking tasks (#22779)
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
This commit is contained in:
@@ -192,10 +192,10 @@ where
|
||||
let (execution_tx, execution_rx) = std::sync::mpsc::channel();
|
||||
let (sparse_trie_tx, sparse_trie_rx) = std::sync::mpsc::channel();
|
||||
|
||||
self.executor.spawn_blocking(move || {
|
||||
self.executor.spawn_blocking_named("wait-exec-cache", move || {
|
||||
let _ = execution_tx.send(execution_cache.wait_for_availability());
|
||||
});
|
||||
self.executor.spawn_blocking(move || {
|
||||
self.executor.spawn_blocking_named("wait-sparse-tri", move || {
|
||||
let _ = sparse_trie_tx.send(sparse_trie.wait_for_availability());
|
||||
});
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ impl ProofWorkerHandle {
|
||||
let storage_avail = storage_available_workers.clone();
|
||||
let storage_roots = cached_storage_roots.clone();
|
||||
let storage_parent_span = tracing::Span::current();
|
||||
runtime.spawn_blocking(move || {
|
||||
runtime.spawn_blocking_named("storage-workers", move || {
|
||||
let worker_id = AtomicUsize::new(0);
|
||||
storage_rt.proof_storage_worker_pool().broadcast(storage_worker_count, |_| {
|
||||
let worker_id = worker_id.fetch_add(1, Ordering::Relaxed);
|
||||
@@ -204,7 +204,7 @@ impl ProofWorkerHandle {
|
||||
let account_tx = storage_work_tx.clone();
|
||||
let account_avail = account_available_workers.clone();
|
||||
let account_parent_span = tracing::Span::current();
|
||||
runtime.spawn_blocking(move || {
|
||||
runtime.spawn_blocking_named("account-workers", move || {
|
||||
let worker_id = AtomicUsize::new(0);
|
||||
account_rt.proof_account_worker_pool().broadcast(account_worker_count, |_| {
|
||||
let worker_id = worker_id.fetch_add(1, Ordering::Relaxed);
|
||||
|
||||
Reference in New Issue
Block a user