diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2002-02-01 12:34:58 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2002-02-01 12:34:58 +0000 |
commit | 291dc0ee667a45aa1e84f099a6a01fcff5096202 (patch) | |
tree | a02ab08c613e6bd4a4441db3f6689a2a33c73c0e | |
parent | e281e13f1dab7f8d07db1b7e3a0e572120f5a66a (diff) | |
download | ATCD-291dc0ee667a45aa1e84f099a6a01fcff5096202.tar.gz |
ChangeLogTag:Fri Feb 01 00:00:12 2002 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r-- | ace/Task.h | 11 | ||||
-rw-r--r-- | ace/Thread_Manager.h | 34 |
2 files changed, 35 insertions, 10 deletions
diff --git a/ace/Task.h b/ace/Task.h index c87168175af..3657b8220c4 100644 --- a/ace/Task.h +++ b/ace/Task.h @@ -157,11 +157,12 @@ public: * * Assigning <task> allows you to associate the newly spwaned * threads with an instance of ACE_Task_Base. If <task> == 0, then - * the new threads are automatically with <this> ACE_Task_Base. - * Setting the <task> argument to value other than <this> make the - * thread manipulating functions, like wait(), suspend(), resume() - * useless. Threads spawned with user specified <task> value must - * be manipulated thru ACE_Thread_Manager directly. + * the new threads are associated automatically with <this> + * ACE_Task_Base. Setting the <task> argument to value other than + * <this> makes the thread manipulating methods, such as wait(), + * suspend(), resume(), useless. Threads spawned with user + * specified <task> value must therefore be manipulated thru + * ACE_Thread_Manager directly. * * If <stack> != 0 it is assumed to be an array of <n> pointers to * the base of the stacks to use for the threads being spawned. diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h index 1d063c5ee71..f0a5c91aeb2 100644 --- a/ace/Thread_Manager.h +++ b/ace/Thread_Manager.h @@ -496,9 +496,33 @@ public: size_t stack_size = 0); /** - * Create N new threads, all of which execute <func>. - * Returns: on success a unique group id that can be used to control - * all of the threads in the same group. On failure, returns -1. + * Spawn N new threads, which execute <func> with argument <arg>. + * If <thread_ids> != 0 the thread_ids of successfully spawned + * threads will be placed into the <thread_ids> buffer (which must + * be the same size as <n>). If <stack> != 0 it is assumed to be an + * array of <n> pointers to the base of the stacks to use for the + * threads being spawned. If <stack_size> != 0 it is assumed to be + * an array of <n> values indicating how big each of the + * corresponding <stack>s are. If <thread_handles> != 0 it is + * assumed to be an array of <n> thread_handles that will be + * assigned the values of the thread handles being spawned. + * + * Threads in Thread_Manager can be maniputated in groups based on + * <grp_id> or <task> using functions such as kill_grp() or + * cancel_task(). + * + * If <grp_id> is assigned, the newly spawned threads are added into + * the group. Otherwise, the Thread_Manager assigns these <n> + * threads with a grp_id. You should choose either assigning + * <grp_id> everytime, or let the Thread_Manager handles it for + * you consistently. + * + * The argument <task> is usually assigned by + * <ACE_Task_Base::activate>. It associates the newly spawned + * threads with an ACE_Task instance, which defaults to <this>. + * + * @retval -1 on failure (<errno> will explain...), otherwise returns the + * group id of the threads. */ */ int spawn_n (size_t n, ACE_THR_FUNC func, @@ -534,8 +558,8 @@ public: * you consistently. * * The argument <task> is usually assigned by - * ACE_Task_Base::activate. It associate the newly spawned threads - * with an ACE_Task instance. + * <ACE_Task_Base::activate>. It associates the newly spawned + * threads with an ACE_Task instance, which defaults to <this>. * * @retval -1 on failure (<errno> will explain...), otherwise returns the * group id of the threads. */ |