summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-08 01:00:59 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-08 01:01:00 +0100
commitf8c5c1356465f503e1a8357ceff01bb956d51c9e (patch)
tree36b5bc1c2d5767b3eee0820c70b91fdfc57287b3 /src/corelib/thread
parenteda28621f6c1a68774719f382be53ec109123b18 (diff)
parent153726bc167406414f589f72bea76c3229cfa815 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index d3f60eea4f..05bc064005 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -650,6 +650,13 @@ QThread::Priority QThread::priority() const
Forces the current thread to sleep for \a secs seconds.
+ Avoid using this function if you need to wait for a given condition to
+ change. Instead, connect a slot to the signal that indicates the change or
+ use an event handler (see \l QObject::event()).
+
+ \note This function does not guarantee accuracy. The application may sleep
+ longer than \a secs under heavy load conditions.
+
\sa msleep(), usleep()
*/
@@ -658,6 +665,14 @@ QThread::Priority QThread::priority() const
Forces the current thread to sleep for \a msecs milliseconds.
+ Avoid using this function if you need to wait for a given condition to
+ change. Instead, connect a slot to the signal that indicates the change or
+ use an event handler (see \l QObject::event()).
+
+ \note This function does not guarantee accuracy. The application may sleep
+ longer than \a msecs under heavy load conditions. Some OSes might round \a
+ msecs up to 10 ms or 15 ms.
+
\sa sleep(), usleep()
*/
@@ -666,6 +681,15 @@ QThread::Priority QThread::priority() const
Forces the current thread to sleep for \a usecs microseconds.
+ Avoid using this function if you need to wait for a given condition to
+ change. Instead, connect a slot to the signal that indicates the change or
+ use an event handler (see \l QObject::event()).
+
+ \note This function does not guarantee accuracy. The application may sleep
+ longer than \a usecs under heavy load conditions. Some OSes might round \a
+ usecs up to 10 ms or 15 ms; on Windows, it will be rounded up to a multiple
+ of 1 ms.
+
\sa sleep(), msleep()
*/