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

屬性值

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

例外狀況

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

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

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

處理序 Id 無法使用。

備註

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

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

注意

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

適用於

另請參閱