Reputation: 1998
I'm using CreateThread for my threads.
One thread is taking a lot of cpu %, I need to have that reduced.
Yes, I know I can just call Sleep(), but in this case its complicated to implement.
How do I set the thread to run in low priority or if not possible, then how do I run my application in low priority?
Upvotes: 0
Views: 471
Reputation: 2191
SetThreadPriority will set the priority of individual threads. Alternatively, as you asked, you can use SetPriorityClass to change the base priority of the process. It is this base priority, combined with thread priorities, from which the actual thread priority is derived.
Upvotes: 1