rpa::thread_exec_lock< Thr, Mtx > Class Template Reference

#include <thread_exec_lock.h>

List of all members.

Public Member Functions

 ~thread_exec_lock ()
int create (thread_func_t aFunc, void *aData)
void join (void)
void cancel (void)
bool exec_lock (void)

Static Private Member Functions

static void * func (void *aThr)

Private Attributes

Mtx _Mtx
 Reimplements a kind of condition variable.
volatile thread_func_t _Func
void * _Data


Detailed Description

template<class Thr, class Mtx>
class rpa::thread_exec_lock< Thr, Mtx >

Encapsulates a thread and a mutex into a data type, functionaly equivalent to a thread, and which allows to reuse a thread (instead of creating and deleting each time). For this, we implement a condition variable with this mutex. Please note that :


Constructor & Destructor Documentation

template<class Thr, class Mtx>
rpa::thread_exec_lock< Thr, Mtx >::~thread_exec_lock (  )  [inline]


Member Function Documentation

template<class Thr, class Mtx>
void rpa::thread_exec_lock< Thr, Mtx >::cancel ( void   )  [inline]

template<class Thr, class Mtx>
int rpa::thread_exec_lock< Thr, Mtx >::create ( thread_func_t  aFunc,
void *  aData 
) [inline]

template<class Thr, class Mtx>
bool rpa::thread_exec_lock< Thr, Mtx >::exec_lock ( void   )  [inline]

template<class Thr, class Mtx>
static void* rpa::thread_exec_lock< Thr, Mtx >::func ( void *  aThr  )  [inline, static, private]

template<class Thr, class Mtx>
void rpa::thread_exec_lock< Thr, Mtx >::join ( void   )  [inline]


Member Data Documentation

template<class Thr, class Mtx>
void* rpa::thread_exec_lock< Thr, Mtx >::_Data [private]

template<class Thr, class Mtx>
volatile thread_func_t rpa::thread_exec_lock< Thr, Mtx >::_Func [private]

template<class Thr, class Mtx>
Mtx rpa::thread_exec_lock< Thr, Mtx >::_Mtx [private]

Reimplements a kind of condition variable.


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:31 2007 for rpa by  doxygen 1.4.7