diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-08-23 23:40:14 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-08-23 23:57:24 +0900 |
commit | ddce1c91f8582885497b463b24bac59f6fdfdf63 (patch) | |
tree | 52d4570fdcb8c1c2d21245fad88940b0020a2b88 /doc/freeeditions.doc | |
parent | 82ecd83484c9fa1ede059986ab771e74e33e68ef (diff) | |
download | tqt3-ddce1c91f8582885497b463b24bac59f6fdfdf63.tar.gz tqt3-ddce1c91f8582885497b463b24bac59f6fdfdf63.zip |
Improve handling of the global post event list in order to minimize possible crashes on exit.
Key points:
1. a TQPostEventList can now have an associated mutex, which is used in case of the global post event list (GPEL)
2. the lifetime of the GPEL is no longer associated to the lifetime of the TQApplication object, but rather extended to the lifetime of the main thread. The GPEL is a static local initialized on first access and destroyed when the global static object destructor is invoked
3. access to the GPEL after the TQApplication object has been destroyed has been minimized by protecting calls in ~TQObject() and ~TQWidget().
4. special care was taken not to affect performances or unnecessarily create tons of unused TQMutexes
This replaces PR #182. Technically it is still possibly unsafe due to the order of destruction of the globat static objects not being guaranteed across multiple compilation units, but the aforementioned changes should minimize (possible to zero) the chances of a SEGV happening.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/freeeditions.doc')
0 files changed, 0 insertions, 0 deletions