ProcessThread.PriorityBoostEnabled 屬性

定義

取得或設定數值,表示每當執行緒的處理序之主視窗接收到焦點 (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

屬性值

若要在使用者與處理序的介面互動時,提高執行緒的優先權,則為 true,否則為 false。 預設為 false

例外狀況

無法擷取優先權提高資訊。

-或-

無法設定優先權提高資訊。

處理序位於遠端電腦上。

備註

當 為 truePriorityBoostEnabled,每當線程的相關進程從等候狀態取出時,系統就會暫時提升線程的優先順序。 此動作可防止其他進程中斷目前線程的處理。 此 PriorityBoostEnabled 設定會影響所有現有的線程,以及進程後續建立的任何線程。 若要還原正常行為,請將 PriorityBoostEnabled 屬性設定為 false

PriorityBoostEnabled 只有在線程在進程中 PriorityClass 執行,且其設定為其中一個動態優先順序列舉值, (NormalHighRealTime) 時,才會生效。

注意

提升優先順序太高,可能會清空基本操作系統和網路功能的資源。 這可能會導致其他操作系統工作發生問題。

適用於

另請參閱