pub unsafe extern "C" fn napi_ref_threadsafe_function(
env: napi_env,
func: napi_threadsafe_function,
) -> napi_statusAvailable on crate feature
napi only.Expand description
Indicates that the event loop running on the main thread should not exit until 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 ref thread-safe function failed.
Available since API-level: 10