how can I change the priority of thread during Runtime?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > how can I change the priority of thread during Runtime?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    how can I change the priority of thread during Runtime?  
Luotao Fu


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-20-05 12:49 PM

Hi volks,
I'm wondering how I can change the priority of a thread during the
runtime. For example, a thread reduce its priority itself or increase
the priority of another thread while it's running.
pthread_attr_setschedparam() seem to only work outside the thread and
befor the Creation of the thread to me.

For processes I'd use sched_setscheduler() to change their priorities in
Runtime. I read that sched_setscheduler() also works on threads unter
Linux, but it's not posix compliant. The posix compatibility is however
very important for me in this case, thus I suppose that I cannot use
sched_setscheduler().

I'd be very appreciated for any Advices how I could do this with posix
Threads.

Thanx a lot
Cheers
Luotao Fu





[ Post a follow-up to this message ]



    Re: how can I change the priority of thread during Runtime?  
Nils O. Selåsdal


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-20-05 11:05 PM

Luotao Fu wrote:
> Hi volks,
> I'm wondering how I can change the priority of a thread during the
> runtime. For example, a thread reduce its priority itself or increase
> the priority of another thread while it's running.
> pthread_attr_setschedparam() seem to only work outside the thread and
> befor the Creation of the thread to me.

See pthread_setschedparam

--
Nils O. Selåsdal
www.utelsystems.com





[ Post a follow-up to this message ]



    Re: how can I change the priority of thread during Runtime?  
Luotao Fu


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-20-05 11:05 PM

Nils O. Selåsdal schrieb:
> Luotao Fu wrote:
> 
>
>
> See pthread_setschedparam
>
uups, do should have read the manual with little more attention. :-)
Sorry for the stupid question and Thanx a lot for answering :-).

Cheers
Luotao Fu





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:25 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register