pub fn spawn_blocking<F, R>(blocking_func: F) -> JoinHandle<R> ⓘwhere
F: FnOnce() -> R + 'static,
R: 'static,Expand description
Spawns a blocking task by wrapping the blocking function in an async block. In WASM this is equivalent to spawn_local since true blocking cannot be offloaded to another thread.