Expand description
Pingora tokio runtime.
Tokio runtime comes in two flavors: a single-threaded runtime and a multi-threaded one which provides work stealing. Benchmark shows that, compared to the single-threaded runtime, the multi-threaded one has some overhead due to its more sophisticated work steal scheduling.
This crate provides a third flavor: a multi-threaded runtime without work stealing. This flavor is as efficient as the single-threaded runtime while allows the async program to use multiple cores.
Structs§
- Blocking
Pool Opts - Configuration options for the blocking thread pool used by the runtime.
- NoSteal
Runtime - Multi-threaded runtime backed by a pool of single threaded tokio runtime
- Runtime
Builder - Builder for constructing a
Runtime. - Runtime
Metrics Opts - Configuration options for runtime metrics collection.
- Runtime
Opts - Configuration options for a Tokio runtime.
Enums§
- Runtime
- Pingora async multi-threaded runtime
- Runtime
Metrics Poll Time Histogram Scale - Bucket scale for Tokio’s poll-time histogram.
Functions§
- current_
handle - Return the Handle of current runtime.
If the current thread is under a
Stealruntime, the current Handle is returned. If the current thread is under aNoStealruntime, the Handle of a random thread under this runtime is returned. This function will panic if called outside any runtime.