#include <ace/Thread_Manager.h>
class ACE_Thread_Control {
public:ACE_Thread_Control (ACE_Thread_Manager *tm = 0, int insert = 0);~ACE_Thread_Control (void);void *exit (void *status, int do_thr_exit);int insert (ACE_Thread_Manager *tm, int insert = 0);ACE_Thread_Manager *thr_mgr (void);ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);void *status (void *status);void *status (void);void dump (void) const;ACE_ALLOC_HOOK_DECLARE;private:ACE_Thread_Manager *tm_;void *status_;};
ACE_Thread_Manager uses this class to ensure that threads
it spawns automatically register and unregister themselves
with it.
This class can be stored in thread-specific storage using the
ACE_TSS wrapper. When a thread exits the
ACE_TSS::cleanup function deletes this object, thereby
ensuring that it gets removed from its associated
ACE_Thread_Manager.
ACE_Thread_Control (ACE_Thread_Manager *tm = 0, int insert = 0);
insert != 0, then
register the thread with the Thread_Manager.
~ACE_Thread_Control (void);
Thread_Manager and exit
the thread if do_thr_exit is enabled.
void *exit (void *status, int do_thr_exit);
Thread_Manager and exit
the thread if do_thr_exit is enabled.
int insert (ACE_Thread_Manager *tm, int insert = 0);
Thread_Manager and use it to register ourselves for
correct shutdown.
ACE_Thread_Manager *thr_mgr (void);
Thread_Manager.
ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);
Thread_Manager and return the old
Thread_Manager.
void *status (void *status);
void *status (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
ACE_Thread_Manager *tm_;
void *status_;