Skip to content

Commit 05e92a7

Browse files
committed
Bug#23074173 - NUMBER OF WORKER THREADS GOES UNDER MYSQLX_MIN_WORKER_THREADS
Follow up push. Orginal patch made another problem in scheduler.cc more frequent. Added extra code in sychronized code which checks the state of task queue before making the thread wait for signal.
1 parent 72f463e commit 05e92a7

File tree

4 files changed

+3
-0
lines changed

4 files changed

+3
-0
lines changed

rapid/plugin/x/ngs/src/scheduler.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ bool Scheduler_dynamic::wait_if_idle_then_delete_worker()
230230
if (!is_running())
231231
return false;
232232

233+
if (!m_tasks.empty())
234+
return false;
235+
233236
int result = m_worker_pending_cond.timed_wait(m_worker_pending_mutex,
234237
m_idle_worker_timeout * MILLI_TO_NANO);
235238

0 commit comments

Comments
 (0)