SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Protected Attributes | Friends | List of all members
ThreadGroup Class Reference

#include <ThreadGroup.h>

Public Member Functions

 ThreadGroup (const char *name, ThreadGroup *parentGroup=0)
 
 ~ThreadGroup ()
 
int numActive (bool countDaemon)
 
void stop ()
 Stop all of the threads in this thread group. More...
 
void resume ()
 Resume all of the threads in this thread group. More...
 
void join ()
 Wait until all of the threads have completed. More...
 
void detach ()
 Detach the thread, joins are no longer possible. More...
 
ThreadGroupparentGroup ()
 
void gangSchedule ()
 

Static Protected Attributes

static ThreadGroups_default_group
 

Friends

class Thread
 

Constructor & Destructor Documentation

ThreadGroup ( const char *  name,
ThreadGroup parentGroup = 0 
)

Create a thread group with the specified name. parentGroup specifies the parent ThreadGroup which defaults to the default top-level group.

Destroy the thread group. All of the running threads should be stopped before the ThreadGroup is destroyed.

Member Function Documentation

void detach ( )

Detach the thread, joins are no longer possible.

void gangSchedule ( )

Arrange to have the threadGroup gang scheduled, so that all of the threads will be executing at the same time if multiprocessing resources permit. This interface will typically be employed by the Thread::parallel static method, and will typically not be called directly by user code. Threads added to the group after this call may or may not be included in the schedule gang.

void join ( )

Wait until all of the threads have completed.

int numActive ( bool  countDaemon)

Return a snapshot of the number of living threads. If countDaemon is true, then daemon threads will be included in the count.

ThreadGroup* parentGroup ( )

Return the parent ThreadGroup. Returns null if this is the default threadgroup.

void resume ( )

Resume all of the threads in this thread group.

void stop ( )

Stop all of the threads in this thread group.

Friends And Related Function Documentation

friend class Thread
friend

Member Data Documentation

ThreadGroup* s_default_group
staticprotected

The documentation for this class was generated from the following files: