Skip to main content

in_runtime

Function in_runtime 

pub fn in_runtime() -> bool
Expand description

Whether the calling thread is inside a tokio runtime context: a runtime worker, the thread in a block_on, a blocking-pool thread, or a thread that entered a handle.