summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-12-12 17:29:15 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-12-13 22:32:24 +0000
commit3730c55a87e51ff0f021a49ebdaf4630b3ae8a37 (patch)
treed1aad2e08176d40daeb690d6e8be441bf561f34c /src/corelib
parent05e72d53a6b0546d67dc699f922811790a896fb3 (diff)
QWaitCondition: remove a misleading comment
The comment seems to imply that POSIX "does not allow for spurious wakeups" on a pthread_cond_t, or that it doesn't allow for them to happen on certain conditions. That's a misleading generalization. POSIX allows for spurious wakeups [1], so we must handle them, end of story. [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_timedwait.html Task-number: QTBUG-109364 Change-Id: Iffcfbd85ec84c4e94a051f235fd3b3557a3aea9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/thread/qwaitcondition_unix.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
index 09dc0f0685..4d27e47c3e 100644
--- a/src/corelib/thread/qwaitcondition_unix.cpp
+++ b/src/corelib/thread/qwaitcondition_unix.cpp
@@ -111,9 +111,7 @@ public:
code = pthread_cond_wait(&cond, &mutex);
}
if (code == 0 && wakeups == 0) {
- // many vendors warn of spurious wakeups from
- // pthread_cond_wait(), especially after signal delivery,
- // even though POSIX doesn't allow for it... sigh
+ // spurious wakeup
continue;
}
break;