Skip to main content

spawn_blocking

Function spawn_blocking 

Source
pub async fn spawn_blocking<T: Send + 'static>(
    job: impl FnOnce() -> T + Send + 'static,
) -> Result<T, JoinError>
Expand description

Runs job on the blocking pool, like tokio::task::spawn_blocking.

ยงErrors

The JoinError when the job panicked or the runtime shut down.