logo

Function bastion::io::spawn_blocking[]

pub fn spawn_blocking<F, T>(task: F) -> JoinHandle<T>
Notable traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
    R: 'static + Send
type Output = R;
where
    F: 'static + FnOnce() -> T + Send,
    T: 'static + Send
Expand description

spawn_blocking will use the global executor instance, which is determined by the cargo features, to spawn the given blocking task.