[][src]Function nj_core::create_promise

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

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