Thread Termination

Describes the effects caused by a 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 thread'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.

Related API

RThread::Create()