QuantumLibrary
|
Exposes methods to manipulate and access a promise. More...
#include <quantum_ipromise_base.h>
Public Types | |
using | Ptr = std::shared_ptr< IPromiseBase > |
Public Member Functions | |
virtual bool | valid () const =0 |
Determines if this promise still has a shared state with the corresponding future object. More... | |
virtual int | setException (std::exception_ptr ex)=0 |
Set an exception in this promise. More... | |
virtual IThreadFutureBase::Ptr | getIThreadFutureBase () const =0 |
Get a thread-compatible interface used to access the associated future. More... | |
virtual ICoroFutureBase::Ptr | getICoroFutureBase () const =0 |
Get a coroutine-compatible interface used to access the associated future. More... | |
![]() | |
virtual | ~ITerminate ()=default |
Virtual destructor. This function is explicitly left empty. More... | |
virtual void | terminate ()=0 |
Terminates the object. More... | |
Exposes methods to manipulate and access a promise.
using Bloomberg::quantum::IPromiseBase::Ptr = std::shared_ptr<IPromiseBase> |
|
pure virtual |
Get a coroutine-compatible interface used to access the associated future.
Implemented in Bloomberg::quantum::Promise< T >.
|
pure virtual |
Get a thread-compatible interface used to access the associated future.
Implemented in Bloomberg::quantum::Promise< T >.
|
pure virtual |
Set an exception in this promise.
When setting an exception inside a promise, any attempt to read a value from the associated future will re-throw this exception. Any threads or coroutines already blocked on this future will immediately unblock and re-throw.
[in] | ex | An exception pointer which has been caught via std::current_exception. |
Implemented in Bloomberg::quantum::Promise< T >.
|
pure virtual |
Determines if this promise still has a shared state with the corresponding future object.
Implemented in Bloomberg::quantum::Promise< T >.