napi_run_event_loop

Function napi_run_event_loop 

Source
pub unsafe extern "C" fn napi_run_event_loop(
    env: napi_env,
    mode: napi_event_mode,
) -> napi_status
Available on crate features napi and api-12 only.
Expand description

Run the event loop by the given env and running mode in current thread.

Support to run the native event loop in an asynchronous native thread with the specified running mode.

§Arguments

  • env - Current running virtual machine context.

  • mode - Indicates the running mode of the native event loop.

§Returns

  • Return the function execution status.

Available since API-level: 12