Skip to main content

spawn_detached

Function spawn_detached 

Source
pub fn spawn_detached<F>(fut: F)
where F: Future + 'static,
Expand description

Spawns a future on the current thread without a join handle.

The future and its output need not be Send. The output is dropped on completion. Like spawn(), this applies registered task callbacks, but does not create a join handle. Without a handle, the task is cancelled as soon as it is pending and no clone of its waker is stored, see spawn().

ยงPanics

Panics if no native runtime is active on the current thread.