Internet Direct (Indy)
Home
PreviousUpNext
TIdThreadPriority Type

Indicates the scheduling priority for a thread.

Pascal
TIdThreadPriority = TThreadPriority;

TIdThreadPriority is an enumerated type used when scheduling the priority of a thread relative to other processes on the local computer system. TIdThreadPriority is a platform-specific enumeration, and contains values pertinent to the operating system or platform. 

 

For the Linux platform, TIdThreadPriority is defined as a numeric enumeration. Each value corresponds to the "niceness" scale, where positive numbers indicate a lower priority. 

 

On the Windows and .Net platforms, TIdThreadPriority is defined as a TThreadPriority type. Windows schedules CPU cycles for each thread based on a priority scale; the Priority property adjusts a thread's priority higher or lower on the scale. TIdThreadPriority can contain one of the following values and meanings: 

 

Value 
Meaning 
The thread executes only when the system is idle. Windows won't interrupt other threads to execute a thread with tpIdle priority. 
The thread's priority is two points below normal. 
The thread's priority is one point below normal. 
The thread has normal priority. 
The thread's priority is one point above normal. 
The thread's priority is two points above normal. 
The thread gets highest priority. 

 

Use SetThreadPriority to adjust the priority of a thread using the platform-specific API calls required.

Boosting the thread priority of a CPU intensive operation may adversely affect other threads in the application. Only apply priority boosts to threads that spend most of their time waiting for external events.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.