Process.PriorityBoostEnabled Property
Gets or sets a value indicating whether the associated process priority should temporarily be boosted by the operating system when the main window has the focus.
[Visual Basic] Public Property PriorityBoostEnabled As Boolean [C#] public bool PriorityBoostEnabled {get; set;} [C++] public: __property bool get_PriorityBoostEnabled(); public: __property void set_PriorityBoostEnabled(bool); [JScript] public function get PriorityBoostEnabled() : Boolean; public function set PriorityBoostEnabled(Boolean);
Property Value
true if dynamic boosting of the process priority should take place for a process when it is taken out of the wait state; otherwise, false. The default is false.
Exceptions
| Exception Type | Condition |
|---|---|
| Win32Exception | Priority boost information could not be retrieved from the associated process resource. |
| PlatformNotSupportedException | You are accessing this member using Windows 98.
-or- The process identifier or process handle is zero. (The process has not been started.) |
| SystemException | You are attempting to access the PriorityBoostEnabled property for a process that is running on a remote computer. The property is available only for processes running on the local computer.
-or- The process Id is not available. |
Remarks
When a thread runs in a process for which the priority class has one of the dynamic priority enumeration values (Normal, High, or RealTime), the system temporarily boosts the thread's priority when it is taken out of a wait state. This action prevents other processes from interrupting the processing of the current thread. The PriorityBoostEnabled setting affects all the existing threads and any threads subsequently created by the process. To restore normal behavior, set the PriorityBoostEnabled property to false.
Note Boosting the priority too high can drain resources from essential operating system and network functions, causing problems with other operating system tasks.
Requirements
Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- SecurityPermission for calling any members of System.Diagnostic.Process with full trust. Associated enumeration: PermissionState.Unrestricted
See Also
Process Class | Process Members | System.Diagnostics Namespace | PriorityClass | BasePriority