Name

SetPriorityClass( )

Synopsis

Sets the priority class for the specified process.

SetPriorityClass(handle, priorityClass)

Parameters

handle

A PyHANDLE or integer that represents the handle to the thread for which the affinity mask is to be set.

priorityClass

Specifies the priority class for the process. Specify one of the following values:

win32process.ABOVE_NORMAL_PRIORITY_CLASS

Windows 2000 only: indicates a process that has priority above NORMAL_PRIORITY_CLASS but below HIGH_PRIORITY_CLASS.

win32process.BELOW_NORMAL_PRIORITY_CLASS

Windows 2000 only: indicates a process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS.

win32process.HIGH_PRIORITY_CLASS

A process that performs time-critical tasks that must be executed immediately. The threads of the process preempt the threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when called by the user, regardless of the load on the operating system. Use extreme care when using the high-priority class, because a high-priority class application can use nearly all available CPU time.

win32process.IDLE_PRIORITY_CLASS

Threads run only when the system is idle. The threads of the process are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle-priority class is inherited by child processes.

win32process.NORMAL_PRIORITY_CLASS

No special scheduling needs.

win32process.REALTIME_PRIORITY_CLASS

The highest ...

Get Python Programming On Win32 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.