File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -171,10 +171,6 @@ napi_status ThreadSafeFunction::call(
171171 // Auto-finalize when: no remaining threads (acquire/release balance),
172172 // queue drained, and not already closing.
173173 if (!self->threadCount_ && empty) {
174- // if (self->maxQueueSize_) {
175- // std::lock_guard lock{self->queueMutex_};
176- // self->queueCv_.notify_all();
177- // }
178174 self->finalize ();
179175 }
180176 });
@@ -228,10 +224,10 @@ napi_status ThreadSafeFunction::unref() {
228224}
229225
230226void ThreadSafeFunction::finalize () {
231- if (handlesClosing_ ) {
227+ if (finalizeScheduled_ ) {
232228 return ;
233229 }
234- handlesClosing_ = true ;
230+ finalizeScheduled_ = true ;
235231 closing_ = true ;
236232
237233 const auto onFinalize = [self = shared_from_this ()] {
You can’t perform that action at this time.
0 commit comments