首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> 专家专栏 >> Symbian翻译小组 >> Symbian OS SDK V8.1a >> Symbian OS guide >> Base >> Using User Library >> Memory Management >> concepts >> 文章正文
线程和进程 ID
作者:LeeFJ    文章来源:PhonerCN    更新时间:2006-5-9 0:14:02
译者: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 Id

--------------------------------------------------------------------------------

Thread and process ID
线程和进程 ID

Each thread and process is allocated an ID which is unique across all threads and processes. The ID is allocated when the thread or process is created.
每一个进程和线程都会分配一个在所有进程和线程中唯一的ID,这个ID在进程或线程创建的时候分配。

The main motivation for the ID is to provide assistance for debuggers; it provides an easy way to identify threads and processes.
之所以使用ID,因为它对于调试有一定的帮助,它提供了一个简单的方法来确定进程或线程。
In general, applications and servers can use IDs for thread and process identification or, indeed, for whatever purpose that suits them.
通常,应用程序和服务器可以使用ID来识别进程和线程,或者还可以做任何其他需要的使用。

While a thread ID is a property of the thread, it can be retrieved from the thread by calling RThread::Id(). The ID is encapsulated by a TThreadId object that is returned by the function.
线程ID是线程的一个属性,它可以通过调用RThread::Id()方法获取。ID被封装在TThreadId对象当中,通过函数返回。
The TThreadId class provides == and != operators for comparing two thread IDs.
TThreadId 类提供了==和!=操作符对两个ID进行比较。

The process ID is similar; it can be retrieved from the process by calling RProcess::Id(), and is encapsulated by a TProcessId object returned by the function.
进程ID也是类似的。它可以通过调用RProcess::Id()函数返回,并且被封装在TProcessId 对象中。


--------------------------------------------------------------------------------
Copyright ©2005  Symbian Ltd.       unknown-build-id

相关文章:
线程与进程的优先级
线程的终止
线程赋值的相对优先级
线程的绝对优先级别
固化进程
进程与线程简介
进程类型
异常处理
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号