Process.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

屬性值

Boolean

當處理序離開等候狀態時,如果應動態提高處理序優先權,則為true ,否則為 false。 預設為 false

例外狀況

無法從關聯的處理序資源擷取優先權提升資訊。

處理序識別碼或處理序控制代碼為零。 (尚未啟動處理序)。

您正在嘗試存取於遠端電腦上執行之處理序的 PriorityBoostEnabled 屬性。 這個屬性僅供在本機電腦執行的處理序使用。

處理序 Id 無法使用。

備註

這個屬性傳回的值代表最近重新整理的暫存優先權提升。 若要取得最新的值,您必須先呼叫 Refresh() 方法。

當執行緒在優先順序類別具有其中一個動態優先順序列舉值 Normal (、 HighRealTime) 的進程中執行時,系統會線上程從等候狀態取出時暫時提升該執行緒的優先順序。 此動作可防止其他進程中斷目前線程的處理。 此 PriorityBoostEnabled 設定會影響進程後續建立的所有現有線程和任何執行緒。 若要還原正常行為,請將 PriorityBoostEnabled 屬性設定為 false

注意

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

適用於

另請參閱