[Qt-interest] QThread and Posix realtime?
Dan Mills
dmills at exponent.myzen.co.uk
Thu Nov 4 03:57:34 CET 2010
Hi all,
I am working on some code which would really benefit from having a
couple of threads run SCHED_FIFO rather then SCHED_OTHER, but there does
not appear to be any documented way to get to the pthread id so this can
be enabled.
A quick test suggests that the various thread priorities offered by QT
are actually all within the normal SCHED_OTHER scheduling class.
Is there any way to either create a QThread from an existing pthread (In
which case I can set up the thread to suit myself then have QT inherit
it, or failing that is there a way to extract the pthread id from a
newly created QThread.
A solution pair that produced an appropriate thread id on POSIX and a
suitable handle on Windows would be ideal.
In extremis I can just use the POSIX API and do it the hard way, except
that QT seems to complain when you create a thread without going through
the QThread mechanism.
Any help would be much appreciated.
Regards, Dan.
More information about the Qt-interest-old
mailing list