napi_get_threadsafe_function_context

Function napi_get_threadsafe_function_context 

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

Obtains the context of a thread-safe function.

§Arguments

  • func - The created thread-safe function.

  • result - Pointer pointer to the context of the thread-safe function.

§Returns

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

[napi_invalid_arg] If func or result is nullptr.

Available since API-level: 10