#include <future.hpp>
Inherits mace::cmt::promise_base.
Public Types | |
typedef retainable_ptr< promise > | ptr |
Public Member Functions | |
promise (const T &v) | |
bool | error () const |
virtual bool | ready () const |
virtual const T & | wait (const microseconds &timeout=microseconds::max()) |
virtual const T & | wait_until (const system_clock::time_point &timeout) |
virtual void | set_exception (const boost::exception_ptr &e) |
virtual void | set_value (T &&v) |
virtual void | set_value (const T &v) |
Static Public Member Functions | |
static ptr | make () |
Protected Member Functions | |
virtual void | set_timeout () |
Protected Attributes | |
cmt::spin_yield_lock | m_spin_yield |
boost::exception_ptr | m_error |
boost::optional< T > | m_value |
This promise blocks cooperatively until the value is provided. It will allow other tasks to run in the current thread if wait() is called while there is a current mace::cmt::thread stack.
Definition at line 54 of file future.hpp.