rpa::target< ResultType, Allocator > Class Template Reference

#include <synchro.h>

List of all members.

Public Member Functions

template<class PresentType>
 target (const PresentType &refPres, Allocator tmpAlloc=Allocator())
const ResultType & result (void) const

Private Attributes

counted_ptr< holder_base_ptrSpwn

Classes

class  holder
struct  holder_base


Detailed Description

template<class ResultType, class Allocator = std::allocator< ResultType >>
class rpa::target< ResultType, Allocator >

This object can be freely copied. It contains the running thread, and the future result. It cannot be destructed until the thread is terminated.


Constructor & Destructor Documentation

template<class ResultType, class Allocator = std::allocator< ResultType >>
template<class PresentType>
rpa::target< ResultType, Allocator >::target ( const PresentType &  refPres,
Allocator  tmpAlloc = Allocator() 
) [inline]

When the target is destroyed, it calls the destructor of the spawn, which cannot leave until the thread is finished, because of the target. It is possible to specify an allocator object.


Member Function Documentation

template<class ResultType, class Allocator = std::allocator< ResultType >>
const ResultType& rpa::target< ResultType, Allocator >::result ( void   )  const [inline]


Member Data Documentation

template<class ResultType, class Allocator = std::allocator< ResultType >>
counted_ptr< holder_base > rpa::target< ResultType, Allocator >::_ptrSpwn [private]

The counted ptr makes that even if the future is copied, the thread which is running still points on the same object.


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