pub unsafe fn create_threadsafe_function(
env: Env,
func: Value,
async_resource: Value,
async_resource_name: Value,
max_queue_size: usize,
initial_thread_count: usize,
thread_finalize_data: *mut c_void,
thread_finalize_cb: Finalize,
context: *mut c_void,
call_js_cb: ThreadsafeFunctionCallJs,
result: *mut ThreadsafeFunction,
) -> Result<(), Status>
Available on crate features
sys
and napi-4
only.