ProcessThread.CurrentPriority 屬性

定義

取得執行緒的目前優先權。

public:
 property int CurrentPriority { int get(); };
public int CurrentPriority { get; }
member this.CurrentPriority : int
Public ReadOnly Property CurrentPriority As Integer

屬性值

執行緒目前的優先權,可能與基礎優先權 (根據作業系統如何排程執行緒) 不符合。 針對作用中的執行緒,可能暫時提高優先權。

備註

線程的目前優先順序可能會偏離基底優先順序。 例如,當進程必須放在其他進程之前,才能存取處理器時,操作系統可以根據經過的時間或其他提升來變更 CurrentPriority 屬性。 此外,您可以設定 PriorityBoostEnabled 屬性,讓系統在進程離開等候狀態時暫時提升線程的優先順序。 當進程回到等候狀態時,就會重設優先順序。

適用於

另請參閱