16 #ifndef BLOOMBERG_QUANTUM_IPROMISE_BASE_H 17 #define BLOOMBERG_QUANTUM_IPROMISE_BASE_H 20 #include <quantum/interface/quantum_iterminate.h> 21 #include <quantum/interface/quantum_ifuture.h> 22 #include <quantum/quantum_traits.h> 34 using Ptr = std::shared_ptr<IPromiseBase>;
38 virtual bool valid()
const = 0;
61 #endif //BLOOMBERG_QUANTUM_IPROMISE_BASE_H Definition: quantum_buffer_impl.h:22
std::shared_ptr< IPromiseBase > Ptr
Definition: quantum_ipromise_base.h:34
virtual ICoroFutureBase::Ptr getICoroFutureBase() const =0
Get a coroutine-compatible interface used to access the associated future.
virtual IThreadFutureBase::Ptr getIThreadFutureBase() const =0
Get a thread-compatible interface used to access the associated future.
IPromiseBase::Ptr IPromiseBasePtr
Definition: quantum_ipromise_base.h:57
std::shared_ptr< ICoroFutureBase > Ptr
Definition: quantum_icoro_future_base.h:34
std::shared_ptr< IThreadFutureBase > Ptr
Definition: quantum_ithread_future_base.h:34
Exposes methods to manipulate and access a promise.
Definition: quantum_ipromise_base.h:32
virtual bool valid() const =0
Determines if this promise still has a shared state with the corresponding future object.
virtual int setException(std::exception_ptr ex)=0
Set an exception in this promise.