ACE_Thread_Descriptor Class Reference
Information for controlling threads that run under the control of the <Thread_Manager>.
More...
#include <Thread_Manager.h>
List of all members.
Detailed Description
Information for controlling threads that run under the control of the <Thread_Manager>.
Constructor & Destructor Documentation
ACE_Thread_Descriptor::ACE_Thread_Descriptor |
( |
void |
|
) |
|
ACE_Thread_Descriptor::~ACE_Thread_Descriptor |
( |
void |
|
) |
|
Do nothing destructor to keep some compilers happy.
Member Function Documentation
void ACE_Thread_Descriptor::acquire |
( |
void |
|
) |
|
void ACE_Thread_Descriptor::acquire_release |
( |
void |
|
) |
|
Do nothing but to acquire the thread descriptor's lock and release. This will first check if the thread is registered or not. If it is already registered, there's no need to reacquire the lock again. This is used mainly to get newly spawned thread in synch with thread manager and prevent it from accessing its thread descriptor before it gets fully built. This function is only called from ACE_Log_Msg::thr_desc.
int ACE_Thread_Descriptor::at_exit |
( |
void * |
object, |
|
|
ACE_CLEANUP_FUNC |
cleanup_hook, |
|
|
void * |
param | |
|
) |
| | |
Register an object (or array) for cleanup at thread termination. "cleanup_hook" points to a (global, or static member) function that is called for the object or array when it to be destroyed. It may perform any necessary cleanup specific for that object or its class. "param" is passed as the second parameter to the "cleanup_hook" function; the first parameter is the object (or array) to be destroyed. Returns 0 on success, non-zero on failure: -1 if virtual memory is exhausted or 1 if the object (or arrayt) had already been registered.
Register an At_Thread_Exit hook and the ownership is retained for the caller. Normally used when the at_exit hook is created in stack.
Register an At_Thread_Exit hook and the ownership is acquire by Thread_Descriptor, this is the usual case when the AT is dynamically allocated.
void ACE_Thread_Descriptor::at_pop |
( |
int |
apply = 1 |
) |
[private] |
Pop an At_Thread_Exit from at thread termination list, apply the at if apply is true.
void ACE_Thread_Descriptor::at_push |
( |
ACE_At_Thread_Exit * |
cleanup, |
|
|
bool |
is_owner = false | |
|
) |
| | [private] |
Push an At_Thread_Exit to at thread termination list and set the ownership of at.
void ACE_Thread_Descriptor::do_at_exit |
( |
void |
|
) |
[private] |
Run the AT_Thread_Exit hooks.
void ACE_Thread_Descriptor::dump |
( |
void |
|
) |
const |
Dump the state of an object.
void ACE_Thread_Descriptor::log_msg_cleanup |
( |
ACE_Log_Msg * |
log_msg |
) |
|
This cleanup function must be called only for ACE_TSS_cleanup. The ACE_TSS_cleanup delegate Log_Msg instance destruction when Log_Msg cleanup is called before terminate.
void ACE_Thread_Descriptor::release |
( |
void |
|
) |
|
Reset this thread descriptor.
Unique handle to thread (used by Win32 and AIX).
Set/get the next_
pointer. These are required by the ACE_Free_List.
void ACE_Thread_Descriptor::terminate |
( |
void |
|
) |
[private] |
Terminate realize the cleanup process to thread termination.
Friends And Related Function Documentation
Member Data Documentation
Thread_Descriptor is the ownership of ACE_Log_Msg if log_msg_!=0 This can occur because ACE_TSS_cleanup was executed before terminate.
Registration lock to prevent premature removal of thread descriptor.
Keep track of termination status.
The documentation for this class was generated from the following files: