diff options
author | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-28 19:17:52 +0000 |
---|---|---|
committer | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-28 19:17:52 +0000 |
commit | b65c8507338c22442535ab9031818e994222adde (patch) | |
tree | f44cfdf6b7dbc3671e76528aef8c789b52338a2a /ace/Thread_Manager.h | |
parent | f708b72fe1cd49f20cbd9347cc95d71d2f0b32d7 (diff) | |
download | ATCD-b65c8507338c22442535ab9031818e994222adde.tar.gz |
Changed wait on exit behavior (exp. Win32.) See ChangeLog-97c.
Diffstat (limited to 'ace/Thread_Manager.h')
-rw-r--r-- | ace/Thread_Manager.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h index c672b041e04..249e68fc16f 100644 --- a/ace/Thread_Manager.h +++ b/ace/Thread_Manager.h @@ -69,7 +69,7 @@ public: // 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. - + ~ACE_Thread_Descriptor (void); // Do nothing destructor to keep some compilers happy @@ -157,7 +157,7 @@ public: int open (size_t size = 0); // No-op. Currently unused. - int close (int automatic_wait = 1); + int close (); // Release all resources. // By default, this method will wait till all threads // exit. However, when called from <close_singleton>, most global resources @@ -378,6 +378,11 @@ public: // thread manager and prevent it from accessing it thread descriptor // before it gets fully built. + void wait_on_exit (int dowait); + int wait_on_exit (void); + // Access function to determine whether the Thread_Manager will + // wait for its thread to exit or not when being closing down. + void dump (void); // Dump the state of an object. @@ -428,13 +433,9 @@ protected: // Append a thread in the table (adds at the end, growing the table // if necessary). - void remove_thr (ACE_Thread_Descriptor *td); + void remove_thr (ACE_Thread_Descriptor *td, int close_handler); // Remove thread from the table. - void remove_thr_self(void); - // Same as above but must be called from the context of the thread - // that is to be removed. - // = The following four methods implement a simple scheme for // operating on a collection of threads atomically. @@ -484,6 +485,10 @@ protected: int grp_id_; // Keeps track of the next group id to assign. + int automatic_wait_; + // Set if we want the Thread_Manager to wait on all threads before + // being closed, reset otherwise. + // = ACE_Thread_Mutex and condition variable for synchronizing termination. #if defined (ACE_HAS_THREADS) ACE_Thread_Mutex lock_; |