Skip to main content

spawn

Function spawn 

Source
pub fn spawn<F>(future: F)
where F: Future<Output = ()> + Send + 'static,
Expand description

Spawn a future on the runtime.

  • Native: tokio::spawn (runs on Tokio thread pool, requires Send).
  • WASM: wasm_bindgen_futures::spawn_local (runs on the microtask queue).