Mono Class Library: System.Threading Namespace

System.Threading.ThreadPriority Enumeration

Specifies the scheduling priority of a System.Threading.Thread.
[System.Runtime.InteropServices.ComVisible(true)]
public enum ThreadPriority

Remarks

System.Threading.ThreadPriority values specify the relative scheduling priority of threads.

Operating systems are not guaranteed to support preemptive scheduling. Also, the concept of "thread priority" might not exist at all or its meaning might vary, depending on the underlying operating system. Implementers of this type are required to describe how the notion of thread priority maps to operating system priority. For more information about threads, see the System.Threading.Thread class.

The Thread.Priority property sets and returns the priority value information for a thread. Applications can request a scheduling priority for a thread by setting the Thread.Priority property to the appropriate ThreadPriority value. The default thread priority is ThreadPriority.Normal .

Note: A thread cannot be scheduled if it is in the ThreadState.Unstarted state or the ThreadState.Stopped state.

Members

Member NameDescription
AboveNormal Threads with this priority can be scheduled after threads with ThreadPriority.Highest priority and before those with ThreadPriority.Normal priority.
BelowNormalThreads with this priority can be scheduled after threads with ThreadPriority.Normal priority, and before those with ThreadPriority.Lowest priority.
HighestThreads with this priority can be scheduled before threads with any other priority.
LowestThreads with this priority can be scheduled after threads with any other priority.
Normal

Threads with this priority can be scheduled after threads with ThreadPriority.AboveNormal priority and before those with ThreadPriority.BelowNormal priority.

Threads have ThreadPriority.Normal priority by default.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0