CLR线程优先级
CLR为每个线程分配了从0(最低)~31(最高)的一个优先级。CLR线程的优先级取决于两个标准:
- 进程的优先级类 – Idle, Below Normal, Normal, Above Normal, High, Realtime
- 在其进程的优先级类中,线程的优先级 – Idle, Lowest, Below Normal, Normal, Above Normal, Highest, Time-Critical
进程优先级/相对线程优先级和优先级的映射关系
Idle | Below Normal | Normal | Above Normal | High | Realtime | |
Time-Critical | 15 | 15 | 15 | 15 | 15 | 31 |
Highest | 6 | 8 | 10 | 12 | 15 | 26 |
Above Normal | 5 | 7 | 9 | 11 | 14 | 25 |
Normal | 4 | 6 | 8 | 10 | 13 | 24 |
Below Normal | 3 | 5 | 7 | 9 | 12 | 23 |
Lowest | 2 | 4 | 6 | 8 | 11 | 22 |
Idle | 1 | 1 | 1 | 1 | 1 | 16 |