NAME

ACE_Future - This class implements a ``single write, multiple read'' pattern that can be used to return results from asynchronous method invocations.

SYNOPSIS


#include <ace/Future.h>


template<class T>
class ACE_Future
{
  public:
    ACE_Future (void);
    ACE_Future (const ACE_Future<T> &r);
    ACE_Future (const T &r);
    ~ACE_Future (void);
    void operator = (const ACE_Future<T> &r);
    int cancel (const T &r);
    int operator == (const ACE_Future<T> &r) const;
    int operator != (const ACE_Future<T> &r) const;
    int set (const T &r);
    int get (T &value, ACE_Time_Value *tv = 0);
    operator T ();
    int ready (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    ACE_Future_Rep<T> *create_rep_i (void) const;
    void* operator new (size_t nbytes);
    void operator delete(void *);
    void operator &();
    ACE_Future_Rep<T> *future_rep_;
    ACE_Thread_Mutex mutex_;
};

DESCRIPTION

Initialization and termination methods.

ACE_Future (void);
ACE_Future (const ACE_Future<T> &r);
ACE_Future (const T &r);
~ACE_Future (void);
void operator = (const ACE_Future<T> &r);
int cancel (const T &r);
int operator == (const ACE_Future<T> &r) const;
int operator != (const ACE_Future<T> &r) const;
int set (const T &r);
int get (T &value, ACE_Time_Value *tv = 0);
operator T ();
int ready (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;

AUTHOR

Andres Kruse Andres.Kruse@cern.ch and Douglas C. Schmidt schmidt@cs.wustl.edu

LIBRARY

ace