# tokio::task::unconstrained - Rust
API documentation for the Rust `unconstrained` fn in crate `tokio`.
Keywords: rust, rustlang, rust-lang, unconstrained

# Function tokio::task::unconstrained [−] [src]

###

    pub fn unconstrained<F>(inner: F) -> Unconstrained<F>ⓘNotable traits for Unconstrained<F>impl<F> Future for Unconstrained<F> where
        F: Future,     type Output = <F as Future>::Output;

Turn off cooperative scheduling for a future. The future will never be forced to yield by Tokio. Using this exposes your service to starvation if the unconstrained future never yields otherwise.

See also the usage example in the task module.