Possible Duplicate:
How to increase thread priority in pthreads?
I have a multithread code written in C++ using pthread. basically I have a main thread doing critical work and another thread doing maintenance. I'm wondering if there is a way to set a lower priority in the second thread so it runs when the first one is not busy?
You can use pthread_setschedparam to set the priority of the thread
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With