Indy 9
SetThreadPriority
Unit: IdGlobal
Updates the priority of a thread.
procedure SetThreadPriority(AThread: TThread; const APriority: TIdThreadPriority; const APolicy: Integer = -MaxInt);
Unit
IdGlobal
Parameters
AThread: TThread
The thread to be updated.
const APriority: TIdThreadPriority
The thread priority value to be used for the thread.
Description
SetThreadPriority is a procedure used to update the priority of the thread in AThread to the value specified in APriority. SetThreadPriority encapsulates the platform-specific procedures and functions used to update the priority of a thread. For the Windows platform, Priority is a published property of TThread.

On the Linux platform, thread priority can only be increased for threads running with "root" login permissions. In this situation, SetThreadPriority will only allow non-root threads to lower their thread priority using the libc setpriority function. An attempt to increase thread priority for a non-root thread is ignored.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.