fix(napi): remove useless aquire while creating ThreadsafeFunction ()

This commit is contained in:
LongYinan 2023-01-18 11:20:47 +08:00 committed by GitHub
parent 3db49adcdc
commit 6739ddda20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions
crates/napi/src

View file

@ -246,8 +246,6 @@ impl<T: 'static, ES: ErrorStrategy::T> ThreadsafeFunction<T, ES> {
)
})?;
check_status!(unsafe { sys::napi_acquire_threadsafe_function(raw_tsfn) })?;
Ok(ThreadsafeFunction {
handle: Arc::new(ThreadsafeFunctionHandle {
raw: raw_tsfn,