Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members  

Result Class Reference

#include <Future.h>

List of all members.

Public Methods

 Result ()
 Create the Result.

 ~Result ()
 Destroy the Result.

void setResult (const ResultType &value)
template<typename T> void setException (const T &t)
ResultType getResult ()

Friends

class Future


Detailed Description

template<typename ResultType>
class ZThread::Future< ResultType >::Result

An instance of Result is used to recieve and eventually hold the value or the exception produced by a Callable.


Member Function Documentation

ResultType getResult   [inline]
 

Get the result or throw the exeption.

Returns :
ResultType

void setException const T &    t [inline]
 

Setting the exception will release all waiters.

Parameters:
t  - exception to propogate to threads waiting for results.
Postcondition:
thread blocked on Future::getResult() will awaken with an exception.

void setResult const ResultType &    value [inline]
 

Setting the result will release all waiters.

Parameters:
value  - made available to the waiters with Future::getResult()


The documentation for this class was generated from the following file:
Generated on Tue Aug 27 07:43:13 2002 for ZThread by doxygen1.2.17