Редагувати

Поділитися через


ProcessThread.PriorityBoostEnabled Property

Definition

Gets or sets a value indicating whether the operating system should temporarily boost the priority of the associated thread whenever the main window of the thread's process receives the focus.

public:
 property bool PriorityBoostEnabled { bool get(); void set(bool value); };
public bool PriorityBoostEnabled { get; set; }
member this.PriorityBoostEnabled : bool with get, set
Public Property PriorityBoostEnabled As Boolean

Property Value

true to boost the thread's priority when the user interacts with the process's interface; otherwise, false. The default is false.

Exceptions

The priority boost information could not be retrieved.

-or-

The priority boost information could not be set.

The process is on a remote computer.

Remarks

When PriorityBoostEnabled is true, the system temporarily boosts the thread's priority whenever its associated process is taken out of the wait state. This action prevents other processes from interrupting the processing of the current thread. The PriorityBoostEnabled setting affects all existing threads as well as any threads subsequently created by the process. To restore normal behavior, set the PriorityBoostEnabled property to false.

PriorityBoostEnabled has an effect only when the thread is running in a process that has a PriorityClass set to one of the dynamic priority enumeration values (Normal, High, or RealTime).

Note

Boosting the priority too high can drain resources from essential operating system and network functions. This could cause problems with other operating system tasks.

Applies to

See also