DotNX::Core::Future< ResultType > Class Template Reference

Future implementation helper class. More...

Inheritance diagram for DotNX::Core::Future< ResultType >:

DotNX::Core::ThreadBase

List of all members.

Protected Member Functions

 Future (ResultType res)
 Constructor.

Protected Attributes

ResultType result
 A placeholder for the task's result.

Properties

bool IsDone [get]
 true if the task has completed, false otherwise.
ResultType Result [get]
 The task's result.


Detailed Description

template<ResultType>
class DotNX::Core::Future< ResultType >

Future implementation helper class.

Spawns a thread to perform a task asynchronously, providing means to probe for completion or to wait until the task's result is available. TODO: Review the whole implementation.

Template Parameters:
ResultType 

Constructor & Destructor Documentation

template<ResultType >
DotNX::Core::Future< ResultType >::Future ( ResultType  res  )  [protected]

Constructor.

Parameters:
res The result's initial value, in case it may serve as accumulator.


Member Data Documentation

template<ResultType >
ResultType DotNX::Core::Future< ResultType >::result [protected]

A placeholder for the task's result.

To be accessed only from within the spawned thread!


Property Documentation

template<ResultType >
bool DotNX::Core::Future< ResultType >::IsDone [get]

true if the task has completed, false otherwise.

Doesn't block if the task is still in progress.

template<ResultType >
ResultType DotNX::Core::Future< ResultType >::Result [get]

The task's result.

Blocks until the task has completed.


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

SourceForge.net Logo
Generated on Sat Oct 18 14:13:25 2008 for .Nick's 0.1.0 by  doxygen 1.5.7.1