File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,15 @@ class ThreadSafeFunction
4040
4141 static std::shared_ptr<ThreadSafeFunction> get (napi_threadsafe_function func);
4242
43- napi_status getContext (void ** result);
44- napi_status call (void * data, napi_threadsafe_function_call_mode isBlocking);
45- napi_status acquire ();
46- napi_status release (napi_threadsafe_function_release_mode mode);
43+ [[nodiscard]] napi_status getContext (void ** result);
44+ [[nodiscard]] napi_status call (
45+ void * data, napi_threadsafe_function_call_mode isBlocking);
46+ [[nodiscard]] napi_status acquire ();
47+ [[nodiscard]] napi_status release (napi_threadsafe_function_release_mode mode);
4748 // Node-API compatibility: These do not affect RN's lifecycle. We only track
4849 // the state for diagnostics and API parity with libuv's ref/unref.
49- napi_status ref ();
50- napi_status unref ();
50+ [[nodiscard]] napi_status ref ();
51+ [[nodiscard]] napi_status unref ();
5152
5253 private:
5354 void finalize ();
@@ -70,7 +71,7 @@ class ThreadSafeFunction
7071 std::queue<void *> queue_;
7172 std::atomic<bool > closing_{false };
7273 std::atomic<bool > referenced_{true };
73- std::atomic<bool > handlesClosing_ {false };
74+ std::atomic<bool > finalizeScheduled_ {false };
7475};
7576
7677} // namespace callstack::nodeapihost
You can’t perform that action at this time.
0 commit comments