Skip to main content

Crate pingora_runtime

Crate pingora_runtime 

Source
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§

BlockingPoolOpts
Configuration options for the blocking thread pool used by the runtime.
NoStealRuntime
Multi-threaded runtime backed by a pool of single threaded tokio runtime
RuntimeBuilder
Builder for constructing a Runtime.
RuntimeMetricsOpts
Configuration options for runtime metrics collection.
RuntimeOpts
Configuration options for a Tokio runtime.

Enums§

Runtime
Pingora async multi-threaded runtime
RuntimeMetricsPollTimeHistogramScale
Bucket scale for Tokio’s poll-time histogram.

Functions§

current_handle
Return the Handle of current runtime. If the current thread is under a Steal runtime, the current Handle is returned. If the current thread is under a NoSteal runtime, the Handle of a random thread under this runtime is returned. This function will panic if called outside any runtime.