Skip to main content

Crate reth_tasks

Crate reth_tasks 

Source
Expand description

Reth task management.

Blocking concurrency primitives are provided by [reth_concurrency::sync].

§Feature Flags

  • rayon: Enable native task-management helpers for rayon thread pools.
  • fuzz: Enable simulation support; primitives remain native unless --cfg dst is also set. With both enabled, threads, selected channels, pools, and time use the deterministic backend. Existing Tokio channels remain native and are not controlled by Shuttle.

Re-exports§

pub use pool::build_pool_with_panic_handler;rayon
pub use pool::Worker;rayon
pub use pool::WorkerPool;rayon
pub use pool::WorkerStatefulPool;rayon
pub use for_each_ordered::ForEachOrdered;rayon
pub use cancel::CancelOnDrop;
pub use cancel::ManualCancel;
pub use lazy::LazyHandle;
pub use runtime::RayonConfig;rayon
pub use runtime::Runtime;
pub use runtime::RuntimeBuildError;
pub use runtime::RuntimeBuilder;
pub use runtime::RuntimeConfig;
pub use runtime::TokioConfig;

Modules§

cancel
Cooperative cancellation of spawned work.
for_each_orderedrayon
Lock-free ordered parallel iterator extension trait.
lazy
A lazily-resolved handle to a value computed on a background thread.
metrics
Task Executor Metrics
poolrayon
Additional helpers for executing tracing calls
runtime
Centralized management of async and parallel execution.
shutdown
Helper for shutdown signals
utils
Task utility functions.

Macros§

once
Runs the given closure exactly once per call site.

Structs§

PanickedTaskError
Error with the name of the task that panicked and an error downcasted to string, if possible.
TaskManager
Monitors critical tasks for panics and manages graceful shutdown.

Functions§

spawn_blocking
Spawns a blocking closure on the current tokio runtime, like [tokio::task::spawn_blocking].
spawn_os_threadNot (dst and fuzz)
Spawns a thread on the selected blocking backend.
spawn_scoped_os_threadNot (dst and fuzz)
Spawns a scoped thread on the selected blocking backend.
spawn_scoped_thread
Spawns a scoped thread on the selected blocking backend.
spawn_thread
Spawns a thread on the selected blocking backend.

Type Aliases§

TaskExecutor
A TaskExecutor is now an alias for Runtime.