Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse ThreadsafeFunction in EventQueue #739

Merged
merged 12 commits into from
Jun 29, 2021
Prev Previous commit
Next Next commit
small stylistic fixes
indutny-signal committed Jun 8, 2021

Unverified

This user has not yet uploaded their public signing key.
commit f8fc9f8795aa34acd5b05e010ee2a90b77fad35a
4 changes: 2 additions & 2 deletions crates/neon-runtime/src/napi/tsfn.rs
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ impl<T: Send + 'static> ThreadsafeFunction<T> {
pub unsafe fn reference(&self, env: Env) {
assert_eq!(
napi::ref_threadsafe_function(env, self.tsfn.0),
napi::Status::Ok
napi::Status::Ok,
);
}

@@ -165,7 +165,7 @@ impl<T: Send + 'static> ThreadsafeFunction<T> {
pub unsafe fn unref(&self, env: Env) {
assert_eq!(
napi::unref_threadsafe_function(env, self.tsfn.0),
napi::Status::Ok
napi::Status::Ok,
);
}