pub fn spawn_blocking<F, R>(func: F) -> JoinHandle<R> ⓘExpand description
Spawns a blocking task onto the current runtime.
Returns a JoinHandle that can be awaited to get the task’s result.
§Panics
- If no runtime is currently running
pub fn spawn_blocking<F, R>(func: F) -> JoinHandle<R> ⓘSpawns a blocking task onto the current runtime.
Returns a JoinHandle that can be awaited to get the task’s result.