Skip to main content

spawn_detached

Function spawn_detached 

Source
pub fn spawn_detached<F>(future: F) -> Result<(), Unscheduled<F>>
where F: Future<Output = ()> + MaybeSend + 'static,
Expand description

Run future detached from the caller on the current executor.

Post: Ok means the executor owns the future; Err hands it back unpolled because no executor is current, and the caller runs it inline or refuses the work.