译者:LeeFJ SYMBIAN OS SDK V8.1A
--------------------------------------------------------------------------------
» Symbian OS SDK v8.1a » Symbian OS guide » Base » Using User Library (E32) » Thread And Process Management » Using Threads and Processes » Thread and process priorities --------------------------------------------------------------------------------
Thread and Process Priorities 线程与进程的优先级
At any time, the thread running is the one with the highest priority which is ready to run. The priority of a thread is simply a number; the value determines the priority; the greater the number, the higher the priority. 在任何时候,运行中的线程总是所有具有最高优先级线程中的一个,并且之前已经处于就绪状态。线程的优先级只是一个简单的数字;这个数字决定了线程的优先级;数字越大那么优先级也就越高。
This value is termed the absolute priority of the thread and is calculated from the priority values assigned through the API to both the thread and the process which owns that thread.
这个值被决定了线程的绝对优先级,这个绝对优先级是通过API赋值给线程的优先级以及它所在进程的优先级共同计算得到的。
A process can take one of eight discrete priority values; these are the individual enumerators of the TProcessPriority enumeration, defined in e32std.h, and range from EPriorityLow, the lowest, to EPrioritySupervisor, the highest. 进程可以使用8个优先级,这些都是定义在TProcessPriority中独立的枚举变量,TProcessPriority 在e32std.h中定义。它的范围从最低的EPriorityLow到最高的EPrioritySupervisor。
In practice, user processes can only be assigned priorities that are less than EPriorityWindowServer, i.e. a user process can only be assigned one of the values: 在实际应用中,用户进程可以得到的优先级总是要小于EPriorityWindowServer。也就是说,用户进程只可以得到以下优先级中的一个:
EPriorityLow
EPriorityBackground
EPriorityForeGround
EPriorityHigh
A process priority can be assigned: 进程的优先级可以被赋值:
· when the associated .exe is built; this is done by specifying the value in the .mmp file that defines the project. 当与之相关的.exe文件被生成的时候。这个可以通过工程中的.mmp文件来指定。 (译者:关于这个可以查看 mmp语句的 epocprocesspriority )
· using RProcess::SetPriority(). 使用RProcess::SetPriority().
--------------------------------------------------------------------------------
See also Using Makmake in the Build Tools Guide.
-------------------------------------------------------------------------------- Copyright ©2005 Symbian Ltd. unknown-build-id
|