rpa::thread_repair_t< Thr > Class Template Reference

#include <thread_repair.h>

List of all members.

Public Member Functions

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

Private Attributes

bool _works


Detailed Description

template<class Thr>
class rpa::thread_repair_t< Thr >

Executes the code of a thread which could not start because it was missing quotas or system resources (memory, stack, too many threads ... ) It can be especially useful for distributed computing if remote nodes may crash. It has to be able to restart if a thread crashed when running.


Constructor & Destructor Documentation

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


Member Function Documentation

template<class Thr>
void rpa::thread_repair_t< Thr >::cancel ( void   )  [inline]

It may be worth, in the future, to extend 'cancel' signature by adding a return value ? Not necessary now.

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

If it is a simple mistake due to a temporary lack of resources, this just returns a NULL value, without throwing an exception. At this moment, this error is considered as temporary and, instead of waiting that these resources become available, the main thread executes immediately the code.

template<class Thr>
bool rpa::thread_repair_t< Thr >::exec_lock ( void   )  [inline]

template<class Thr>
void rpa::thread_repair_t< Thr >::join ( void   )  [inline]


Member Data Documentation

template<class Thr>
bool rpa::thread_repair_t< Thr >::_works [private]


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