Call this member function to set the priority level of the current thread within its priority class.
BOOL SetThreadPriority( int nPriority );
Header File | Afxwin.h |
Platforms | |
Versions | 1.0 and later |
Complete documentation | Visual C++ documentation |
Windows CE does not support priority classes. The order in which threads are scheduled is determined only by their thread priorities. A thread can have one of the following priority levels.
Priority | Meaning |
---|---|
THREAD_PRIORITY_TIME_CRITICAL | 3 points above normal priority. |
THREAD_PRIORITY_HIGHEST | 2 points above normal priority. |
THREAD_PRIORITY_ABOVE_NORMAL | 1 point above normal priority. |
THREAD_PRIORITY_NORMAL | Normal priority. |
THREAD_PRIORITY_BELOW_NORMAL | 1 point below normal priority. |
THREAD_PRIORITY_LOWEST | 2 points below normal priority. |
THREAD_PRIORITY_ABOVE_IDLE | 3 points below normal priority. |
THREAD_PRIORITY_IDLE | 4 points below normal priority. |
In Windows CE, a thread with a priority level of THREAD_PRIORITY_TIME_CRITICAL will execute until it explicitly yields processing to other threads. Processing of these threads is not yielded to other threads, even if another thread also has the THREAD_PRIORITY_TIME_CRITICAL priority level.
CWinThread Overview, CWinThread Member Functions, Application Architecture Classes, CWinThread::GetThreadPriority