ThreadPriorityLevel 枚举

定义

指定线程的优先级别。Specifies the priority level of a thread.

public enum class ThreadPriorityLevel
public enum ThreadPriorityLevel
type ThreadPriorityLevel = 
Public Enum ThreadPriorityLevel
继承
ThreadPriorityLevel

字段

AboveNormal 1

指定的优先级比关联的 ProcessPriorityClass 的普通优先级高一级。Specifies one step above the normal priority for the associated ProcessPriorityClass.

BelowNormal -1

指定的优先级比关联的 ProcessPriorityClass 的普通优先级低一级。Specifies one step below the normal priority for the associated ProcessPriorityClass.

Highest 2

指定最高优先级。Specifies highest priority. 这比关联的 ProcessPriorityClass 的普通优先级高两级。This is two steps above the normal priority for the associated ProcessPriorityClass.

Idle -15

指定空闲优先级。Specifies idle priority. 它是所有线程的可能的最低优先级值,与关联的 ProcessPriorityClass 的值无关。This is the lowest possible priority value of all threads, independent of the value of the associated ProcessPriorityClass.

Lowest -2

指定最低优先级。Specifies lowest priority. 这比关联的 ProcessPriorityClass 的普通优先级低两级。This is two steps below the normal priority for the associated ProcessPriorityClass.

Normal 0

指定关联的 ProcessPriorityClass 的普通优先级。Specifies normal priority for the associated ProcessPriorityClass.

TimeCritical 15

指定时间关键优先级。Specifies time-critical priority. 这是所有线程中的最高优先级,与关联的 ProcessPriorityClass 的值无关。This is the highest priority of all threads, independent of the value of the associated ProcessPriorityClass.

注解

每个线程都有一个基本优先级, 由线程的优先级值和其进程的优先级类确定。Every thread has a base-priority level determined by the thread's priority value and the priority class of its process. 操作系统使用所有可执行线程的基本优先级别来确定哪个线程获取处理器时间的下一扇区。The operating system uses the base-priority level of all executable threads to determine which thread gets the next slice of processor time.

优先级别不是绝对值, 而是优先级值的范围。The priority level is not an absolute value, but instead is a range of priority values. 操作系统通过使用进程优先级类确定PriorityLevel属性指定的范围内的位置来计算优先级, 以设置线程的优先级。The operating system computes the priority by using the process priority class to determine where, in the range specified by the PriorityLevel property, to set the thread's priority.

适用于

另请参阅