use std::future::Future; pub fn spawn(future: F) -> tokio::task::JoinHandle where F: Future + Send + 'static, O: Send + 'static, { crate::RT.get().unwrap().spawn(future) } pub fn spawn_local + 'static>(future: F) { gtk4::glib::MainContext::default().spawn_local(future); }