mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
Merge branch 'queue_lock' of https://github.com/MaxKellermann/zeek
* 'queue_lock' of https://github.com/MaxKellermann/zeek: threading/Queue: lock mutex before notifying the condition_variable
This commit is contained in:
commit
30a794cf5f
3 changed files with 10 additions and 1 deletions
|
@ -255,7 +255,10 @@ template<typename T>
|
|||
inline void Queue<T>::WakeUp()
|
||||
{
|
||||
for ( int i = 0; i < NUM_QUEUES; i++ )
|
||||
{
|
||||
auto lock = acquire_lock(mutex[i]);
|
||||
has_data[i].notify_all();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue