summaryrefslogtreecommitdiff
path: root/ace/Thread_Manager.h
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-11-22 00:17:36 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-11-22 00:17:36 +0000
commit23ccf208357bde16bcd16b5b44bfb42fa6c6c50e (patch)
treea81baf6c19dedaf99529e209356b8bf7140bd77d /ace/Thread_Manager.h
parentd6d7e6a25c64168a4f9cf2a8a9a71ef10cc33b93 (diff)
downloadATCD-23ccf208357bde16bcd16b5b44bfb42fa6c6c50e.tar.gz
* ace/Thread_Manager.{h,cpp} (wait): Added codes to remove detached
threads. This function can be activated selectively. I added this so we can ignore detached threads when closing down the default thread manager. (close): Activated the code to wait (join) all threads managed by the thread manager. It will ask wait function to remove all detached thread first (and so they won't be counted into threads we are waiting for.)
Diffstat (limited to 'ace/Thread_Manager.h')
-rw-r--r--ace/Thread_Manager.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h
index 40f30070334..d0e5b7d0b3f 100644
--- a/ace/Thread_Manager.h
+++ b/ace/Thread_Manager.h
@@ -217,11 +217,14 @@ public:
// non-0 then <ACE_Thread::exit> is called to exit the thread, in
// which case <status> is passed as the exit value of the thread.
- int wait (const ACE_Time_Value *timeout = 0);
+ int wait (const ACE_Time_Value *timeout = 0,
+ int abandon_detached_threads = 0);
// Block until there are no more threads running in the
// <Thread_Manager> or <timeout> expires. Note that <timeout> is
// treated as "absolute" time. Returns 0 on success and -1 on
- // failure.
+ // failure. If <abandon_detached_threads> is set, wait will first
+ // check thru its thread list for threads with THR_DETACHED or
+ // THR_DAEMON flags set and remove these threads.
int wait_grp (int grp_id);
// Block until there are no more threads running in a group.