From RAD Studio API Documentation
Jump to: navigation, search


property Priority: TThreadPriority read GetPriority write SetPriority;


__property TThreadPriority Priority = {read=GetPriority, write=SetPriority, nodefault};


Type Visibility Source Unit Parent
property public
System.Classes TThread


Determines the thread's scheduling priority relative to other threads in the process.

Priority indicates the priority used when scheduling the thread. Adjust the priority higher or lower as needed.

On Win32,Priority is a TThread Priority value. The possible values are listed in a table within the topic “Initializing the Thread” (see the link at the end of this topic). The system schedules CPU cycles to each thread based on a priority scale; the Priority property adjusts a thread's priority higher or lower on the scale.

Warning: Boosting the thread priority of a CPU-intensive operation may "starve" the other threads in the application. Only apply priority boosts to threads that spend most of their time waiting for external events.
Tip: Under Posix/Linux operating system, you need to set TThread.Policy and TThread.Priority jointly.

See Also

Code Examples