napi_unref_threadsafe_function

Function napi_unref_threadsafe_function 

Source
pub unsafe extern "C" fn napi_unref_threadsafe_function(
    env: napi_env,
    func: napi_threadsafe_function,
) -> napi_status
Available on crate feature napi only.
Expand description

Indicates that the event loop running on the main thread may exit before the thread-safe function is destroyed.

§Arguments

  • env - Current running virtual machine context.

  • func - The created thread-safe function.

§Returns

  • Returns the function execution status. [napi_ok] If the function executed successfully.

[napi_invalid_arg] If env or func is nullptr.

[napi_generic_failure] If unref thread-safe function failed.

Available since API-level: 10