16 #ifndef BLOOMBERG_QUANTUM_ICORO_CONTEXT_BASE_H 17 #define BLOOMBERG_QUANTUM_ICORO_CONTEXT_BASE_H 21 #include <quantum/interface/quantum_icontext_base.h> 22 #include <quantum/interface/quantum_icoro_sync.h> 35 using Ptr = std::shared_ptr<ICoroContextBase>;
48 std::chrono::milliseconds timeMs)
const = 0;
57 virtual void waitAt(
int num,
69 virtual std::future_status
waitForAt(
int num,
71 std::chrono::milliseconds timeMs)
const = 0;
83 #endif //BLOOMBERG_QUANTUM_ICORO_CONTEXT_BASE_H virtual std::future_status waitFor(ICoroSync::Ptr sync, std::chrono::milliseconds timeMs) const =0
Waits for the future associated with this context to be ready for a maximum of 'timeMs' milliseconds.
Definition: quantum_buffer_impl.h:22
std::shared_ptr< IContextBase > Ptr
Definition: quantum_icontext_base.h:35
virtual void wait(ICoroSync::Ptr sync) const =0
Waits for the future associated with this context to be ready.
Provides an interface to facilitate 'implicit' coroutine yielding within other primitives such as mut...
Definition: quantum_icoro_sync.h:34
virtual void waitAll(ICoroSync::Ptr sync) const =0
Wait for all the futures in the continuation chain to be ready.
std::shared_ptr< ICoroSync > Ptr
Definition: quantum_icoro_sync.h:36
ICoroContextBase::Ptr ICoroContextBasePtr
Definition: quantum_icoro_context_base.h:79
virtual void waitAt(int num, ICoroSync::Ptr sync) const =0
Waits for the future in the 'num-th' continuation context to be ready.
This interface exposes shared functionality between IThreadContext and ICoroContext.
Definition: quantum_icontext_base.h:33
std::shared_ptr< ICoroContextBase > Ptr
Definition: quantum_icoro_context_base.h:35
virtual std::future_status waitForAt(int num, ICoroSync::Ptr sync, std::chrono::milliseconds timeMs) const =0
Waits for the future in the 'num-th' continuation context to be ready for a maximum of 'timeMs' milli...
Exposes methods to manipulate the coroutine context, especially future wait methods.
Definition: quantum_icoro_context_base.h:32