mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-21 06:37:42 +01:00
Fix dead lock on Timer destructor (#3987)
Consider following situation. A class owns a timer. In destructor of that class we call .cancel() asynchronous on timer before it's destruction. Now timer is executing cancel in it's own internal thread, while it's doing that destructor of timer is called from owning class. Timer destructor enqueues stop notification. If that enqueue is happening just after while loop from cancel notification, stop notification is gonna be dropped and timer will never stop. fixes #3986 Co-authored-by: Vojin Ilic <vilic@nvidia.com>
This commit is contained in:
parent
4cc956483d
commit
39a8b9a7c7
@ -101,7 +101,6 @@ public:
|
||||
pNf = static_cast<TimerNotification*>(queue().dequeueNotification());
|
||||
}
|
||||
|
||||
queue().clear();
|
||||
_finished.set();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user