Function napi::bindgen_prelude::spawn

source ·
pub fn spawn<F>(fut: F) -> JoinHandle<F::Output>where
    F: 'static + Send + Future<Output = ()>,
Expand description

Spawns a future onto the Tokio runtime.

Depending on where you use it, you should await or abort the future in your drop function. To avoid undefined behavior and memory corruptions.