Admin Production ni-theme
Current Publication

ATTR_TP_THREAD_PRIORITY

LabWindows/CVI

ATTR_TP_THREAD_PRIORITY

Data Type: integer
Description: This attribute specifies the run priority for the threads in the pool. Use CmtScheduleThreadPoolFunctionAdv to specify the thread priority for a particular function.

On Windows, the thread priority can be any of the value constants for this attribute. The actual priority of the thread is based on this value and the priority class of the process to which the thread belongs. You can set the priority class of a process with the Windows SDK function SetPriorityClass.

On real-time systems, the thread priority can be any value from -15 to 15. The default priority of a thread in the system is 0. The operating system scheduler runs at priority level 9. Any threads running at a priority level equal to or higher than 9 are not subject to timeslicing by the scheduler and will run until they yield the CPU or are preempted by a higher priority thread.
Values:
THREAD_PRIORITY_TIME_CRITICAL (15)
THREAD_PRIORITY_HIGHEST (2)
THREAD_PRIORITY_ABOVE_NORMAL (1)
THREAD_PRIORITY_NORMAL (0)
THREAD_PRIORITY_BELOW_NORMAL (-1)
THREAD_PRIORITY_LOWEST (-2)
THREAD_PRIORITY_IDLE (-15)
LabWindows/CVI
Compatibility:
LabWindows/CVI 5.5 and later