Skip to main content

spawn_task

Function spawn_task 

Source
pub fn spawn_task<F>(fut: F) -> JoinHandle<F::Output> ⓘ
where F: Future + Send + 'static, F::Output: Send + 'static,
Expand description

Fire-and-forget spawn onto the shared runtime. The future runs on a tokio worker thread; the returned JoinHandle is detached (the caller doesn’t await). Used by the mode dispatcher (M-async.2): activation validation runs synchronously on the App thread, then the lifecycle future is spawn_task’d so the App thread doesn’t block on the future’s .await points.