On Friday, 27 June 2025 21:53:24 Central European Summer Time Art Greenberg wrote: > I am able to overcome that limitation by obtaining the thread handle > returned by QThread::currentThreadId() and using the native pthreads > API. I am aware that this is not suggested in application code.
Actually, no, that's perfectly fine. You an also get the thread's TID and use sched_setscheduler(2). > So, my question. Is there a way to set thread scheduling policy > provided, such that changing the priority will work? A pointer to the Qt > documentation would be appreciated. > > If not, please consider this suggestion: add a method to QThread that > allows setting the scheduling policy, or allows setting the scheduling > policy and priority in a single call similar to pthread_setschedparam(). Sorry, the API in question is reserved for root. Since Qt applications are almost always run as regular users, it would see very little use. Therefore, I don't think we'll add it. For the few users who need it and know what they're doing, like you, you can use the pthreads or Linux-specific API. You're probably doing enough code reviews and static analyses anyway for your application running as root that this is not an undue burden. -- Thiago Macieira - thiago.macieira (AT) intel.com Principal Engineer - Intel Platform & System Engineering
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development