|
Threads-Devel : |
Subject: [Threads-devel] [thread] How to change a thread's scheduling values?
From: John Rocha (jrr_at_[hidden])
Date: 2010-07-09 11:01:12
Greetings all,
I am attempting to use the boost::thread library for my Linux
application. However, I don't want the default thread scheduling, I want
to change to round robin.
I know how to do this using pthread_xxxxx() calls. However, we are being
encouraged to use the boost library for our thread new thread
development. I don't see any methods that would allows one to change the
threads scheduling.
I revisited my pthread functions, and assuming boost is using pthreads
under the covers I could conceivably get the current running thread id
using pthread_self(). Then I can use the returned thread_t (thread id)
for getting and setting the threads scheduling parameters.
However, that seems inappropriate, as it assumes that boost is using
pthreads.
How does one go about changing the scheduling and priority of their
threads when they use the boost::thread library?
Thanks in advance for your help,
-=John
-- Thought for the day: "2 much txting mks u 1 bad splr!!!!"