C++ Actor Framework 1.0.0
|
Provides a facility to store a value or an error that is later acquired asynchronously via a future object. More...
#include <promise.hpp>
Public Types | |
using | value_type = std::conditional_t<std::is_void_v<T>, unit_t, T> |
Public Member Functions | |
promise (promise &&) noexcept=default | |
promise & | operator= (promise &&) noexcept=default |
promise (const promise &other) noexcept | |
promise & | operator= (const promise &other) noexcept |
bool | valid () const noexcept |
operator bool () const noexcept | |
bool | operator! () const noexcept |
void | set_value (value_type value) |
void | set_error (error reason) |
future< T > | get_future () const |
Provides a facility to store a value or an error that is later acquired asynchronously via a future object.
A promise may deliver only one value.
future< T > caf::async::promise< T >::get_future | ( | ) | const |
valid()
void caf::async::promise< T >::set_error | ( | error | reason | ) |
valid()
void caf::async::promise< T >::set_value | ( | value_type | value | ) |
valid()