mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +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
6
CHANGES
6
CHANGES
|
@ -1,4 +1,10 @@
|
|||
|
||||
3.2.0-dev.192 | 2020-02-28 11:36:12 -0800
|
||||
|
||||
* threading::Queue::WakeUp(): lock mutex before notifying condition_variable (Max Kellermann)
|
||||
|
||||
Not locking the associated mutex can create race conditions and lockups.
|
||||
|
||||
3.2.0-dev.190 | 2020-02-28 00:42:17 -0800
|
||||
|
||||
* Stmt: use class IntrusivePtr (Max Kellermann)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.2.0-dev.190
|
||||
3.2.0-dev.192
|
||||
|
|
|
@ -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