From 638b61dec0d335b12d48fe561b19a0f0f6ef83a3 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 1 Apr 2009 13:04:44 +0200 Subject: QThread::start(): priority has no effect on Linux systems The default scheduling policy on Linux doesn't allow specifying thread priorities, so the priority passed to start() and setPriority() has no effect. Document this. Task number: 249997 Reviewed-by: Kavindra Devi Palaraja --- src/corelib/thread/qthread.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 7f87897..2fb6335 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -297,6 +297,12 @@ void QAdoptedThread::run() priority parameter. If the thread is already running, this function does nothing. + The effect of the \a priority parameter is dependent on the + operating system's scheduling policy. In particular, the \a priority + will be ignored on systems that do not support thread priorities + (such as on Linux, see http://linux.die.net/man/2/sched_setscheduler + for more details). + \sa run(), terminate() */ @@ -590,6 +596,12 @@ void QThread::cleanup() The \a priority argument can be any value in the \c QThread::Priority enum except for \c InheritPriorty. + The effect of the \a priority parameter is dependent on the + operating system's scheduling policy. In particular, the \a priority + will be ignored on systems that do not support thread priorities + (such as on Linux, see http://linux.die.net/man/2/sched_setscheduler + for more details). + \sa Priority priority() start() */ -- cgit v0.12