Function create_promise

Source
pub fn create_promise<F, O>(
    js_env: &JsEnv,
    name: &str,
    future: F,
) -> Result<*mut napi_value__, NjError>
where F: Future<Output = O> + 'static + Send, O: TryIntoJs,
Expand description

create promise and schedule work when this is finished it will return result in the main thread