From: Fig TaTam (fig_tatam_at_[hidden])
Date: 2003-04-16 19:05:59
I'm using boost::thread to create a 2 thread program. One thread being the
while() loop inside main() and the other thread is created with boost.
The main() while loop is very big and takes most of processor time. But my
2nd thread is very small. I want to call my thread function 100 times per
second and over relatively even time intervals. So I don't want that
function to be called several times in a row. Because of this, I call
thread::yield() at end of each iteration.
Ok, now here's the problem: my 2nd thread gets called only 50 times a
second. I need 100 times a second. If I use sleep(..) then I waste time. I
want to increase priority on my 2nd thread so it gets switched to more
often. Can I do it?
Protect your PC - get McAfee.com VirusScan Online
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk