mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
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:
parent
e986caddf0
commit
6ebec6dde7
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue