From 32d61565e66004cd22e847715f0b9bb445e465dd Mon Sep 17 00:00:00 2001 From: Chunel Date: Thu, 12 Mar 2026 23:15:17 +0800 Subject: [PATCH] [bugfix] refine fix notify timeout again --- src/UtilsCtrl/ThreadPool/Thread/UThreadPrimary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UtilsCtrl/ThreadPool/Thread/UThreadPrimary.h b/src/UtilsCtrl/ThreadPool/Thread/UThreadPrimary.h index abe5d995..9da7807c 100644 --- a/src/UtilsCtrl/ThreadPool/Thread/UThreadPrimary.h +++ b/src/UtilsCtrl/ThreadPool/Thread/UThreadPrimary.h @@ -116,7 +116,7 @@ class UThreadPrimary : public UThreadBase { CVoid fatWait() { ++cur_empty_epoch_; CGRAPH_YIELD(); - if (cur_empty_epoch_ >= config_->primary_thread_busy_epoch_) { + if (cur_empty_epoch_ >= config_->primary_thread_busy_epoch_ && wsq_.isEmpty()) { CGRAPH_UNIQUE_LOCK lk(mutex_); cv_.wait_for(lk, std::chrono::milliseconds(config_->primary_thread_empty_interval_), [this] { return 0 == cur_empty_epoch_ || !wsq_.isEmpty() || !done_; });