napi_acquire_threadsafe_function

Function napi_acquire_threadsafe_function 

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

Acquires a thread-safe function.

§Arguments

  • func - The created thread-safe function.

§Returns

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

[napi_invalid_arg] If func is nullptr.

[napi_generic_failure] If acquire thread-safe function failed.

Available since API-level: 10