Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.4.1
-
None
-
3730c55a8 (dev)
Description
"Normal" wait condition APIs (incl. std::condition_variable, std::condition_variable_any, pthreads, SleepConditionVariableCS, ...) suffer from spurious wakeups.
QWaitCondition, in both its pthread and win32 implementations, does not suffer from it:
- pthread code has an explicit wake counter
- win32 code uses WaitForSingleEvent, which does not have spurious wakeups
There's a lot of critical code in Qt (e.g. the QML scenegraph) that relies on QWaitCondition not to wake up spuriously.
Also, this "feature" makes a QWaitCondition -> std::condition_variable upgrade not entirely straightforward.
Should this behavior be actually documented?