hexga_engine 0.0.11-beta.53

A multimedia game and software engine for handling graphics, audio, and input.
Documentation
use super::*;

pub trait AsyncSpawn
where
    Self: Future<Output = ()> + Send + 'static,
{
    fn spawn(self);
}

impl<F> AsyncSpawn for F
where
    F: Future<Output = ()> + Send + 'static,
{
    fn spawn(self)
    {
        #[cfg(not(target_arch = "wasm32"))]
        smol::spawn(self).detach();
        #[cfg(target_arch = "wasm32")]
        wasm_bindgen_futures::spawn_local(self);
    }
}