Function glib::spawn_future
source · pub fn spawn_future<R: Send + 'static, F: Future<Output = R> + Send + 'static>(
f: F
) -> JoinHandle<R> ⓘ
Expand description
Spawn a new infallible Future
on the thread-default main context.
This can be called from any thread and will execute the future from the thread
where main context is running, e.g. via a MainLoop
.