TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iFuture Struct Referenceabstract
Inheritance diagram for iFuture:
iUnknown iFutureValue

Detailed Description

Future interface.

A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation.

Public Member Functions

virtual void Cancel ()=0
 Cancel the task associated with the future. More...
 
virtual tBool GetIsCancelled () const =0
 Check whether the task has been cancelled. {Property}. More...
 
virtual tBool GetIsDone () const =0
 Return true if this task completed. {Property}. More...
 
virtual tBool Wait (tU32 anTimeOut)=0
 Wait for the value to be set. More...
 
virtual Var GetValue () const =0
 Return the result of the computation, returns null if the task is not completed. {Property}. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual void Cancel ( )
pure virtual

Cancel the task associated with the future.

virtual tBool GetIsCancelled ( ) const
pure virtual

Check whether the task has been cancelled. {Property}.

virtual tBool GetIsDone ( ) const
pure virtual

Return true if this task completed. {Property}.

Remarks
Equivalent to Wait(0).
virtual tBool Wait ( tU32  anTimeOut)
pure virtual

Wait for the value to be set.

Returns
eFalse if the value hasn't be set in the specified timeout.
virtual Var GetValue ( ) const
pure virtual

Return the result of the computation, returns null if the task is not completed. {Property}.