C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::async::future< T > Class Template Reference

Represents the result of an asynchronous computation. More...

#include <future.hpp>

Public Member Functions

 future (future &&) noexcept=default
 
 future (const future &) noexcept=default
 
futureoperator= (future &&) noexcept=default
 
futureoperator= (const future &) noexcept=default
 
bool valid () const noexcept
 
 operator bool () const noexcept
 
bool operator! () const noexcept
 
bound_future< T > bind_to (execution_context *ctx) &&
 Binds this future to an execution_context to run callbacks.
 
bound_future< T > bind_to (execution_context &ctx) &&
 Binds this future to an execution_context to run callbacks.
 
bound_future< T > bind_to (execution_context *ctx) const &
 Binds this future to an execution_context to run callbacks.
 
bound_future< T > bind_to (execution_context &ctx) const &
 Binds this future to an execution_context to run callbacks.
 
flow::observable< T > observe_on (flow::coordinator *ctx) const
 Binds this future to a coordinator and converts it to an observable.
 
bool pending () const
 Queries whether the result of the asynchronous computation is still pending, i.e., neither set_value nor set_error has been called on the promise.
 
auto get ()
 
template<class Clock , class Duration >
auto get (std::chrono::time_point< Clock, Duration > timepoint)
 
template<class Rep , class Period >
auto get (std::chrono::duration< Rep, Period > timeout)
 

Friends

class promise< T >
 

Detailed Description

template<class T>
class caf::async::future< T >

Represents the result of an asynchronous computation.

Member Function Documentation

◆ bind_to() [1/4]

template<class T >
bound_future< T > caf::async::future< T >::bind_to ( execution_context & ctx) &&

Binds this future to an execution_context to run callbacks.

Precondition
valid()

◆ bind_to() [2/4]

template<class T >
bound_future< T > caf::async::future< T >::bind_to ( execution_context & ctx) const &

Binds this future to an execution_context to run callbacks.

Precondition
valid()

◆ bind_to() [3/4]

template<class T >
bound_future< T > caf::async::future< T >::bind_to ( execution_context * ctx) &&

Binds this future to an execution_context to run callbacks.

Precondition
valid()

◆ bind_to() [4/4]

template<class T >
bound_future< T > caf::async::future< T >::bind_to ( execution_context * ctx) const &

Binds this future to an execution_context to run callbacks.

Precondition
valid()

◆ observe_on()

template<class T >
flow::observable< T > caf::async::future< T >::observe_on ( flow::coordinator * ctx) const

Binds this future to a coordinator and converts it to an observable.

Precondition
valid()

◆ pending()

template<class T >
bool caf::async::future< T >::pending ( ) const

Queries whether the result of the asynchronous computation is still pending, i.e., neither set_value nor set_error has been called on the promise.

Precondition
valid()

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