glib

Function spawn_future_local

Source
pub fn spawn_future_local<R: 'static, F: Future<Output = R> + 'static>(
    f: F,
) -> JoinHandle<R> 
Expand description

Spawn a new infallible Future on the thread-default main context.

The given Future does not have to be Send.

This can be called only from the thread where the main context is running, e.g. from any other Future that is executed on this main context, or after calling with_thread_default or acquire on the main context.