Skip to main content

use_tokio

Function use_tokio 

Source
pub(crate) fn use_tokio() -> bool
Expand description

Whether zbus should use tokio (rather than async-io) for its I/O.

Only consulted when async-io is compiled in, since that’s the only time there’s a choice. With both backends we use tokio when a tokio runtime is active on the current thread; with only async-io the answer is always false. This keeps the features additive: enabling tokio elsewhere in the dependency graph doesn’t force every zbus user into a tokio runtime.