rpa::thread_pool< Thr > Class Template Reference

#include <synchro.h>

List of all members.

Public Member Functions

 thread_pool ()
int create (thread_func_t aFunc, void *aData)

Static Private Member Functions

static void * func (void *aVoid)

Private Attributes

thread_pool_next
thread_func_t _Func
void * _Data

Static Private Attributes

static const unsigned int cstLimList = 5


Detailed Description

template<class Thr>
class rpa::thread_pool< Thr >

This gathers several threads into a thread pool : As soon as one of these threads is finished, instead of simply leaving, its goes on executing the function of other threads which did not started yet, because they were not put on the running queue of the scheduler since their 'create' method was called.


Constructor & Destructor Documentation

template<class Thr>
rpa::thread_pool< Thr >::thread_pool (  )  [inline]


Member Function Documentation

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

template<class Thr>
static void* rpa::thread_pool< Thr >::func ( void *  aVoid  )  [inline, static, private]


Member Data Documentation

template<class Thr>
void* rpa::thread_pool< Thr >::_Data [private]

template<class Thr>
thread_func_t rpa::thread_pool< Thr >::_Func [private]

template<class Thr>
thread_pool* rpa::thread_pool< Thr >::_next [private]

template<class Thr>
const unsigned int rpa::thread_pool< Thr >::cstLimList = 5 [static, private]

When a thread is finished, it explores in the thread list, which one did not started yet. But it does not explore too far, just a couple of threads : This number of steps.


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