protlib::ThreadStarter< T, TParam > Class Template Reference
[Threads]

#include <source/ariba/utility/transport/tcpip/protlib/threads.h>

Collaboration diagram for protlib::ThreadStarter< T, TParam >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ThreadStarter (uint32 count, const TParam &param)
 ~ThreadStarter ()
void start_processing ()
void stop_processing ()
bool sleepuntilstop ()
void wait_until_stopped ()
void abort_processing (bool kill=false)
T * get_thread_object ()
 get a pointer to the thread object
bool is_running () const
 Are all threads finished: TODO.

Private Attributes

thread_object
 The Thread object on which the threads run.
const TParam thread_param
 For debugging, the name of the thread as given by TParam.
std::vector< pthread_t > pthreads
 Contains the handles of all pthreads that we created.


Detailed Description

template<class T, class TParam>
class protlib::ThreadStarter< T, TParam >

A template class used to start threads.

Note that the ThreadStarter template class is not thread-safe yet, so it may only be accessed by one thread at a time.

Definition at line 271 of file threads.h.


Member Function Documentation

template<class T, class TParam>
T* protlib::ThreadStarter< T, TParam >::get_thread_object (  )  [inline]

get a pointer to the thread object

Definition at line 283 of file threads.h.

Referenced by ariba::transport::tcpip::send(), and ariba::transport::tcpip::terminate().

template<class T, class TParam>
bool protlib::ThreadStarter< T, TParam >::is_running (  )  const [inline]

Are all threads finished: TODO.

Definition at line 286 of file threads.h.


Member Data Documentation

template<class T, class TParam>
std::vector<pthread_t> protlib::ThreadStarter< T, TParam >::pthreads [private]

template<class T, class TParam>
T protlib::ThreadStarter< T, TParam >::thread_object [private]

template<class T, class TParam>
const TParam protlib::ThreadStarter< T, TParam >::thread_param [private]


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

Generated on Fri Aug 14 23:39:54 2009 for Ariba by  doxygen 1.5.8