Skip to main content

spawn

Function spawn 

Source
pub fn spawn<F, T>(f: F) -> JoinHandle<T>
where F: FnOnce() -> T + Send + 'static, T: Send + 'static,
Expand description

Spawn a new thread.

On WASM, uses [wasm_safe_thread::Builder] with an explicit shim_name so workers can locate the wasm-bindgen JS shim for initSync.