译者: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 termination
--------------------------------------------------------------------------------
Thread termination 线程的终止
The death of a thread (and any subsequent notifications etc.) is effectively just an indication that the thread will never execute any more code; it does not guarantee that the operating system has yet finished removing the thread. 线程的死亡只是一个简单的指示,表示线程不再执行任何代码。但这并不能保证操作系统已经把线程移出。
When a thread terminates, the operating system cleans up all resources still allocated to the thread; this includes closing any sessions which it had open. Closing a session involves notifying the other party in the session that the thread has disconnected so that it can do its own cleanup; the operating system needs to keep the dead t0hread's data structures until all of this disconnection activity has finished. 当线程终止时,操作系统将清理所有分配给线程的资源,其中也包括了关闭任何线程已经打开的会话。关闭会话时,通知会话的其他部分,告诉他们,线程已经没有连接到会话,这样他们就可以执行他们自己的清理。操作系统必须保持死亡线程的所有数据结构,直到断开过程结束。
If a thread terminates, there may be a period of time during which any attempt to create a new thread of the same name fails with KErrAlreadyExists. 如果线程终止,那么需要一个周期,在这个周期中,任何同名线程将无法创建,并且以KErrAlreadyExists失败退出。 -------------------------------------------------------------------------------- Copyright ©2005 Symbian Ltd. unknown-build-id |