Skip to main content

shared_runtime

Function shared_runtime 

Source
pub fn shared_runtime() -> &'static Handle
Expand description

Get (or lazily build) the shared runtime’s Handle. Cheap to call repeatedly; the underlying Runtime is built once and stays alive for the process lifetime.

The runtime is multi-threaded with the default worker count (num_cpus::get() per tokio’s defaults). Two workers would be enough for v1, but matching tokio’s default keeps behaviour predictable when LSP / plugin tasks land in Phase 4 / 7.