次の方法で共有


ProcessThread.BasePriority プロパティ

スレッドの基本優先順位を取得します。

Public ReadOnly Property BasePriority As Integer
[C#]
public int BasePriority {get;}
[C++]
public: __property int get_BasePriority();
[JScript]
public function get BasePriority() : int;

プロパティ値

プロセスの優先順位クラスと関連付けられたスレッドの優先順位との組み合わせからオペレーティング システムが算出した、スレッドの基本優先順位。

解説

BasePriority は、プロセス スレッドの起動時優先順位です。基本優先順位に関する情報は、システム モニタの Priority Base カウンタに表示されます。

オペレーティング システムは、スレッドの優先順位範囲とプロセスの優先順位クラスを組み合わせて、スレッドの基本優先順位を計算します。プロセスの Process.PriorityClass プロパティには、 ProcessPriorityClass 列挙体のいずれかの値を設定できます。設定できる値は、 IdleNormalHighAboveNormalBelowNormal 、または RealTime です。スレッドの PriorityLevel プロパティは、スレッドの基本優先順位の範囲を指定する値に設定できます。Win32 は 4 つの優先順位クラスと、クラスごとに 7 つの基本優先順位を使用します。

スレッドの現在の優先順位は、基本優先順位と異なることがあります。たとえば、経過時間またはその他の要因に基づき、プロセスを他のプロセスよりも先にプロセッサがアクセスする必要があると判断された場合は、オペレーティング システムが CurrentPriority プロパティを変更することがあります。また、プロセスが待機状態から抜けるたびに、一時的にスレッドの優先順位を上げるように、 PriorityBoostEnabled プロパティを設定できます。プロセスが待機状態に戻ると、優先順位はリセットされます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

ProcessThread クラス | ProcessThread メンバ | System.Diagnostics 名前空間 | PriorityBoostEnabled | ProcessPriorityClass | Process.PriorityClass | CurrentPriority