nautilus_common::runtime

Function get_runtime

Source
pub fn get_runtime() -> &'static Runtime
Expand description

Retrieves a reference to a globally shared Tokio runtime. The runtime is lazily initialized on the first call and reused thereafter.

This global runtime is intended for use cases where passing a runtime around is impractical. It uses default configuration values.

ยงPanics

Panics if the runtime could not be created, which typically indicates an inability to spawn threads or allocate necessary resources.