In the writing program. In order to make the program high efficiency. Sometimes it's a bit high CPU. The user experience here is not good enough to set the thread priority to take care of.
BOOL setthreadpriority (
HANDLE hthread,//HANDLE to the thread
int npriority//thread priority level
);
function Description
sets the priority of the specified thread
parameter Description
Hthread the thread handle to set
npriority Priority parameter can be set to parameter
Thread_priority_above_normal one rank higher than the general priority
Thread_priority_below_normal is one grade lower than the average
thread_priority_highest 2 levels higher than normal
Thread_priority_idle//This value has a good priority. The user experience is better. System IDLE process is using this.
thread_priority_lowest 2 levels lower than normal
Thread_priority_normal General Grade
thread_priority_time_critical
SetThreadPriority (GetCurrentThread (),thread_priority_idle ); OK.
Process occupies hundred percent CPU without card