Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Future< ValueType > Class Template Reference

Detailed Description

template<typename ValueType = void>
class thrill::api::Future< ValueType >

The return type class for all ActionFutures.

This is not a multi-threading Future, instead it is only a variable placeholder containing a pointer to the action node to retrieve the value once it is calculated.

Definition at line 83 of file action_node.hpp.

+ Collaboration diagram for Future< ValueType >:

#include <action_node.hpp>

Public Types

using ActionResultNodePtr = tlx::CountingPtr< ActionResultNode< ValueType > >
 

Public Member Functions

 Future (const ActionResultNodePtr &node)
 
const ValueType & get ()
 Return the value of the ActionFuture. More...
 
const ValueType & operator() ()
 Return the value of the ActionFuture. More...
 
bool valid () const
 true if already executed/valid More...
 
void wait ()
 Evaluate the DIA data-flow graph for this ActionFuture. More...
 

Private Attributes

ActionResultNodePtr node_
 shared pointer to the action node, which may not be executed yet. More...
 

Member Typedef Documentation

Definition at line 87 of file action_node.hpp.

Constructor & Destructor Documentation

Future ( const ActionResultNodePtr node)
inlineexplicit

Definition at line 89 of file action_node.hpp.

Member Function Documentation

const ValueType& get ( )
inline

Return the value of the ActionFuture.

Definition at line 104 of file action_node.hpp.

References thrill::api::NEW, Future< ValueType >::node_, ActionResultNode< ResultType >::result(), DIABase::RunScope(), and DIABase::state().

const ValueType& operator() ( )
inline

Return the value of the ActionFuture.

Definition at line 112 of file action_node.hpp.

bool valid ( ) const
inline

true if already executed/valid

Definition at line 99 of file action_node.hpp.

References thrill::api::EXECUTED, Future< ValueType >::node_, and DIABase::state().

void wait ( )
inline

Evaluate the DIA data-flow graph for this ActionFuture.

Definition at line 93 of file action_node.hpp.

References thrill::api::NEW, Future< ValueType >::node_, DIABase::RunScope(), and DIABase::state().

Referenced by Future< void >::operator()().

Member Data Documentation

ActionResultNodePtr node_
private

shared pointer to the action node, which may not be executed yet.

Definition at line 118 of file action_node.hpp.

Referenced by Future< ValueType >::get(), Future< ValueType >::valid(), Future< void >::valid(), Future< ValueType >::wait(), and Future< void >::wait().


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