Skip to main content

Crate libdd_shared_runtime

Crate libdd_shared_runtime 

Source
Expand description

A shared tokio runtime for running background workers across multiple components.

This crate provides SharedRuntime, which owns a single tokio runtime and manages [PausableWorker]s on it. Components such as the trace exporter can share one runtime instead of each creating their own, reducing thread and resource overhead.

SharedRuntime also provides fork-safety hooks (before_fork, after_fork_parent, after_fork_child) that pause and restart workers around fork() calls, preventing deadlocks in child processes.

Re-exports§

pub use shared_runtime::SharedRuntime;
pub use shared_runtime::SharedRuntimeError;
pub use shared_runtime::WorkerHandle;
pub use shared_runtime::WorkerHandleError;
pub use worker::Worker;

Modules§

shared_runtime
SharedRuntime for managing [PausableWorker]s across fork boundaries.
worker