16 #ifndef BLOOMBERG_QUANTUM_ICORO_FUTURE_BASE_H 17 #define BLOOMBERG_QUANTUM_ICORO_FUTURE_BASE_H 22 #include <quantum/interface/quantum_icoro_sync.h> 34 using Ptr = std::shared_ptr<ICoroFutureBase>;
41 virtual bool valid()
const = 0;
54 std::chrono::milliseconds timeMs)
const = 0;
61 #endif //BLOOMBERG_QUANTUM_ICORO_FUTURE_BASE_H Exposes methods to access a coroutine-compatible future.
Definition: quantum_icoro_future_base.h:32
Definition: quantum_buffer_impl.h:22
virtual void wait(ICoroSync::Ptr sync) const =0
Waits for the future value.
virtual ~ICoroFutureBase()=default
Virtual destructor.
std::shared_ptr< ICoroSync > Ptr
Definition: quantum_icoro_sync.h:36
virtual std::future_status waitFor(ICoroSync::Ptr sync, std::chrono::milliseconds timeMs) const =0
Waits for the future value up to a maximum 'timeMs' milliseconds.
virtual bool valid() const =0
Determines if this future still has a shared state with the corresponding promise object.
std::shared_ptr< ICoroFutureBase > Ptr
Definition: quantum_icoro_future_base.h:34
ICoroFutureBase::Ptr ICoroFutureBasePtr
Definition: quantum_icoro_future_base.h:57