OnLoop: notify_all() instead of notify_one()

There might be more than one thread blocked waiting for room in the
queue, ensure they all wake up when shutting down.
This commit is contained in:
Arne Welzel 2025-05-06 11:52:57 +02:00
parent e986caddf0
commit 6ebec6dde7

View file

@ -97,8 +97,8 @@ public:
std::scoped_lock lock(mtx);
SetClosed(true);
// Wake a process stuck in queueing.
cond.notify_one();
// Wake other threads stuck in queueing, if any.
cond.notify_all();
}
// Wait for any active queuers to vanish, should be quick.