diff options
Diffstat (limited to 'ace/Thread_Manager.h')
-rw-r--r-- | ace/Thread_Manager.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h index 8c7a9172218..916851f48de 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. |