Skip to main content

spawn

Function spawn 

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

Spawn a future as a background task.

  • Native: Uses tokio::spawn (requires Send + 'static).
  • WASM: Uses wasm_bindgen_futures::spawn_local (no Send required).