aboutsummaryrefslogtreecommitdiff
path: root/src/app/utils.rs
blob: 673b96e0bb0f6f89a6dc18d13498400355e5c27a (plain)
1
2
3
4
5
6
7
8
9
use std::future::Future;

/// Spawns a task on the default executor, without waiting for it to complete
pub fn spawn<F>(future: F)
where
    F: Future<Output = ()> + 'static,
{
    gtk4::glib::MainContext::default().spawn_local(future);
}