Skip to main content

spawn_global

Function spawn_global 

Source
pub fn spawn_global(future: impl Future<Output = ()> + 'static)
Expand description

Spawn a future on the global executor at low priority.

Important: init_flush_scheduler must be called before spawning any tasks. Without a flush scheduler, spawned tasks will sit in the queue indefinitely because the executor has no way to schedule a flush cycle.