THREAD SET PRIORITY statement

Purpose | Sets the Priority Value for a thread.
Syntax | THREAD SET PRIORITY hThread, Priority&

Remarks

THREAD SET PRIORITY assigns a new priority value to the thread specified by the thread handle (hThread). The thread handle is returned by the THREAD CREATE statement at the time the thread is created. If hThread is zero (0), the thread which is currently executing is presumed. A thread ID cannot be used in place of a thread handle.

The thread priority value must be one of the following:

%THREAD_PRIORITY_IDLE = -15

%THREAD_PRIORITY_LOWEST = -2

%THREAD_PRIORITY_BELOW_NORMAL = -1

%THREAD_PRIORITY_NORMAL = 0

%THREAD_PRIORITY_ABOVE_NORMAL = +1

%THREAD_PRIORITY_HIGHEST = +2

%THREAD_PRIORITY_TIME_CRITICAL= +15

See also | PROCESS GET PRIORITY, PROCESS SET PRIORITY, THREAD Code Group, THREAD CREATE, THREAD GET PRIORITY, THREAD Object