Module zebrad::components::tokio
source · Expand description
A component owning the Tokio runtime.
The tokio runtime is used for:
- non-blocking async tasks, via
Future
s and - blocking network and file tasks, via
spawn_blocking
.
The rayon thread pool is used for:
- long-running CPU-bound tasks like cryptography, via [
rayon::spawn_fifo
].
Modules§
- imp 🔒
Structs§
- An Abscissa component which owns a Tokio runtime.
Constants§
- When Zebra is shutting down, wait this long for tokio tasks to finish.
Traits§
- Extension trait to centralize entry point for runnable subcommands that depend on tokio
Functions§
- shutdown 🔒Zebrad’s graceful shutdown function, blocks until one of the supported shutdown signals is received.