MACE  1.0.0
 All Classes Namespaces Files Functions Variables Enumerations Defines
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
mace::cmt::promise< T > Class Template Reference

#include <future.hpp>

Inherits mace::cmt::promise_base.

List of all members.

Public Types

typedef retainable_ptr< promiseptr

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

Detailed Description

template<typename T = void_t>
class mace::cmt::promise< T >

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.


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