thread priority

bridged with qdn.public.qnxrtp.newuser
Post Reply
tisa

thread priority

Post by tisa » Tue May 20, 2003 4:31 am

can i change the priority of a thread which is currently runnning?
ie if athread is presently running at priority 10, can i change its
priority to 15?

Mario Charest

Re: thread priority

Post by Mario Charest » Tue May 20, 2003 12:12 pm

"tisa" <ruxyz@yahoo.com> wrote in message
news:bacb2t$s6f$1@tiger.openqnx.com...
can i change the priority of a thread which is currently runnning?
ie if athread is presently running at priority 10, can i change its
priority to 15?
Yes, but if the thread is to set its own priority it can only do it if can
get a chance to run.

Hence if a thread at priority 2 never gets to run because another thread at
priority 3 is using 100% of the CPU, it will never get a chance to execute
the code that changes the priority. Another thread/process will have to do
it.

Post Reply

Return to “qdn.public.qnxrtp.newuser”