CrystalSpace

Public API Reference

CS::Threading::ThreadGroup Class Reference

A group of threads handled as one unit. More...

#include <csutil/threading/thread.h>

Inheritance diagram for CS::Threading::ThreadGroup:

List of all members.

Public Member Functions

void Add (Thread *thread)
 Add a thread to the group.
size_t GetSize () const
 Get number of threads in group.
ThreadGetThread (size_t index) const
 Get thread with specific index.
void Remove (Thread *thread)
 Remove thread from group.
void StartAll ()
 Start all threads in the group.
void StopAll ()
 Stop all threads in the group.
void WaitAll ()
 Wait for all threads in the group.

Detailed Description

A group of threads handled as one unit.

Definition at line 241 of file thread.h.


Member Function Documentation

void CS::Threading::ThreadGroup::Add ( Thread thread  )  [inline]

Add a thread to the group.

A thread will only be added once, even if you run Add two times with same thread object.

Definition at line 250 of file thread.h.

size_t CS::Threading::ThreadGroup::GetSize (  )  const [inline]

Get number of threads in group.

Definition at line 277 of file thread.h.

Thread* CS::Threading::ThreadGroup::GetThread ( size_t  index  )  const [inline]

Get thread with specific index.

Definition at line 268 of file thread.h.

void CS::Threading::ThreadGroup::Remove ( Thread thread  )  [inline]

Remove thread from group.

Definition at line 259 of file thread.h.

void CS::Threading::ThreadGroup::StartAll (  )  [inline]

Start all threads in the group.

See also:
Thread::Start

Definition at line 286 of file thread.h.

void CS::Threading::ThreadGroup::StopAll (  )  [inline]

Stop all threads in the group.

See also:
Thread::Stop

Definition at line 300 of file thread.h.

void CS::Threading::ThreadGroup::WaitAll (  )  [inline]

Wait for all threads in the group.

See also:
Thread::Wait

Definition at line 314 of file thread.h.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1