pub fn spawn<F>(future: F) -> TaskHandleExpand description
Spawn a future on the runtime, returning a handle to the running task.
- Native:
tokio::spawn(runs on Tokio thread pool, requiresSend). - WASM:
wasm_bindgen_futures::spawn_local(runs on the microtask queue, noSendrequirement).
Ignoring the handle detaches the task: nothing can then stop it or wait for
it. Register it with crate::tasks::TaskRegistry instead, so database
shutdown can stop it before the runtime goes away.