#include <OnixS/FIXEngine/Threading/Future.h>
Public Member Functions | |
| Promise () noexcept | |
| Promise (const Promise< T > &other) noexcept | |
| Promise< T > & | operator= (const Promise< T > &other) noexcept |
| Promise (Promise< T > &&other) noexcept | |
| Promise & | operator= (Promise< T > &&other) noexcept |
| void | swap (Promise< T > &other) noexcept |
| SharedFuture< T > | getFuture () const |
| void | set (const T &value) |
| template<typename ExceptionType> | |
| void | setException (const ExceptionType &exception) |
| Public Member Functions inherited from PromiseBase | |
| bool | valid () |
| ONIXS_FIXENGINE_API void | setExceptionImpl () |
Additional Inherited Members | |
| Protected Member Functions inherited from PromiseBase | |
| ONIXS_FIXENGINE_API | PromiseBase () noexcept |
| ONIXS_FIXENGINE_API | PromiseBase (const PromiseBase &other) noexcept |
| ONIXS_FIXENGINE_API PromiseBase & | operator= (const PromiseBase &other) noexcept |
| ONIXS_FIXENGINE_API | PromiseBase (PromiseBase &&other) noexcept |
| ONIXS_FIXENGINE_API PromiseBase & | operator= (PromiseBase &&other) noexcept |
| ONIXS_FIXENGINE_API | ~PromiseBase () noexcept |
| ONIXS_FIXENGINE_API void | swap (PromiseBase &other) noexcept |
| ONIXS_FIXENGINE_API void | setValue (ValueBase *value) |
| ONIXS_FIXENGINE_API void | setVoid () |
| ONIXS_FIXENGINE_API SharedFuture< FutureValue > | getFutureImpl () const |
| template<typename T> | |
| SharedFuture< T > | getTypedFuture () const |
Provides a facility to store a value or an exception that can be acquired asynchronously via a SharedFuture object created by the Promise object. Each Promise object is associated with a shared state, which contains a some state information and a result which may be not yet evaluated, evaluated to a value or evaluated to an exception. The promise stores the result or the exception in the shared state. Marks the state ready and unblocks any thread waiting on a future associated with the shared state.
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |