diff --git a/host_core/native/hostcore_wasmcloud_native/src/lib.rs b/host_core/native/hostcore_wasmcloud_native/src/lib.rs index c834fc8e..dbf9546f 100644 --- a/host_core/native/hostcore_wasmcloud_native/src/lib.rs +++ b/host_core/native/hostcore_wasmcloud_native/src/lib.rs @@ -42,6 +42,14 @@ static TOKIO: Lazy = Lazy::new(|| { .expect("Failed to start tokio runtime") }); +pub(crate) fn spawn(task: T) -> JoinHandle +where + T: Future + Send + 'static, + T::Output: Send + 'static, +{ + TOKIO.spawn(task) +} + const CHONKY_THRESHOLD_BYTES: usize = 1024 * 700; // 700KB pub(crate) const CORELABEL_ARCH: &str = "hostcore.arch";