prefer_tokio in redis::aio - Rust
Description: Mark Tokio as the preferred runtime.

Skip to main content

## prefer_tokio

# Function prefer_tokio

Source

    pub fn prefer_tokio() -> Result<(), RedisError>

Available on crate features `tokio-comp` and `smol-comp` and `aio` only.
Expand description

Mark Tokio as the preferred runtime.

If the function returns `Err`, another runtime preference was already set, and won’t be changed. Call this function if the application doesn’t use multiple runtimes, but the crate is compiled with multiple runtimes enabled, which is a bad pattern that should be avoided.