poco/Foundation
Vojin Ilic b8d1792fa0 Fix hang in destructor
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 owner's destructor. 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.
Fix: Add new method in TimedNotificationQueue which will return a notification regardless of the time it needs to be executed.
Get number of pending tasks in the queue. Flush out that many notifications from queue while taking special consideration of pending Stop and Cancel notifications.
Add test for new method in TimedNotificationQueue and fix cancel all tests to actually check if notification got executed.
fixes #3986
2023-04-04 12:08:49 +02:00
..
cmake fix(cmake): PocoFoundationConfig.cmake should now check for PCRE2 #3677 2022-07-09 19:13:04 +02:00
include/Poco Fix hang in destructor 2023-04-04 12:08:49 +02:00
samples Remove trailing whitespace (#3668) 2022-07-07 04:18:20 -05:00
src Fix hang in destructor 2023-04-04 12:08:49 +02:00
testsuite Fix hang in destructor 2023-04-04 12:08:49 +02:00
wcelibcex-1.0 Remove trailing whitespace (#3668) 2022-07-07 04:18:20 -05:00
CMakeLists.txt Add GNU Hurd support (#3946) 2023-03-17 15:24:57 -05:00
extradirs new trunk (base for 1.5) 2012-04-23 01:14:34 +00:00
Foundation_vs140.sln revert Foundation project files 2020-01-11 23:59:05 +01:00
Foundation_vs140.vcxproj Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Foundation_vs140.vcxproj.filters Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Foundation_vs150.sln revert Foundation project files 2020-01-11 23:59:05 +01:00
Foundation_vs150.vcxproj Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Foundation_vs150.vcxproj.filters Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Foundation_vs160.sln revert Foundation project files 2020-01-11 23:59:05 +01:00
Foundation_vs160.vcxproj Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Foundation_vs160.vcxproj.filters Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Foundation_vs170.sln Remaining changes for Windows on ARM64 support (#3608) 2022-05-26 22:40:30 -05:00
Foundation_vs170.vcxproj Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Foundation_vs170.vcxproj.filters Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00
Makefile Feat/pcre2 (#3663) 2022-07-06 10:46:38 -05:00