O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ProcessPriorityClass

Synopsis

This enumeration represents the different priorities given to a process. Process priorities, along with thread priorities, determine how processor time is allocated. Most processes run with Normal priority. Use Idle to specify that processor time should be allocated to a process only when the processor is idle. AboveNormal and BelowNormal allow you to set priorities slightly above or below Normal, but are not supported by Windows 95, 98, or ME. An exception is thrown if you attempt to use them.

High should be only used for time-critical tasks, but use care in choosing this priority because little time will be available to other applications. RealTime is the maximum allowable priority. When this priority is used, the process runs with higher priority than even the operating system. Assigning High and RealTime to a process will almost certainly make your system’s user interface unresponsive. For this reason, be careful when using these.

public enum ProcessPriorityClass {
            Normal = 32,
            Idle = 64,
            High = 128,
            RealTime = 256,
            BelowNormal = 16384,
            AboveNormal = 32768
}

Hierarchy

System.ObjectSystem.ValueTypeSystem.Enum(System.IComparable, System.IFormattable, System.IConvertible)ProcessPriorityClass

Returned By

Process.PriorityClass

Passed To

Process.PriorityClass

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required