spawn

Function spawn 

Source
pub fn spawn<F>(future: F)
where F: Future + Send + 'static, F::Output: Send + 'static,
Available on non-WebAssembly only.
Expand description

Platform-independent spawn function On native: uses tokio::spawn On WASM: uses wasm_bindgen_futures::spawn_local (single-threaded)