QuantumLibrary
|
Exposes methods to access a coroutine-compatible future. More...
#include <quantum_icoro_future.h>
Public Types | |
using | ContextTag = CoroContextTag |
using | Ptr = std::shared_ptr< ICoroFuture< T > > |
using | Impl = Future< T > |
![]() | |
using | Ptr = std::shared_ptr< ICoroFutureBase > |
Public Member Functions | |
template<class V = T> | |
NonBufferRetType< V > | get (ICoroSync::Ptr sync) |
Get the future value. More... | |
template<class V = T> | |
const NonBufferRetType< V > & | getRef (ICoroSync::Ptr sync) const |
Get a reference the future value. More... | |
template<class V = T> | |
BufferRetType< V > | pull (ICoroSync::Ptr sync, bool &isBufferClosed) |
Pull a single value from the future buffer. More... | |
![]() | |
virtual | ~ICoroFutureBase ()=default |
Virtual destructor. More... | |
virtual bool | valid () const =0 |
Determines if this future still has a shared state with the corresponding promise object. More... | |
virtual void | wait (ICoroSync::Ptr sync) const =0 |
Waits for the future value. More... | |
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. More... | |
Exposes methods to access a coroutine-compatible future.
Exposes methods to access a non-coroutine future (i.e. accessed from a thread)
using Bloomberg::quantum::ICoroFuture< T >::ContextTag = CoroContextTag |
using Bloomberg::quantum::ICoroFuture< T >::Impl = Future<T> |
using Bloomberg::quantum::ICoroFuture< T >::Ptr = std::shared_ptr<ICoroFuture<T> > |
NonBufferRetType< V > Bloomberg::quantum::ICoroFuture< T >::get | ( | ICoroSync::Ptr | sync | ) |
Get the future value.
[in] | sync | Pointer to the coroutine synchronization object. |
Implemented in Bloomberg::quantum::Future< T >.
const NonBufferRetType< V > & Bloomberg::quantum::ICoroFuture< T >::getRef | ( | ICoroSync::Ptr | sync | ) | const |
Get a reference the future value.
[in] | sync | Pointer to the coroutine synchronization object. |
Implemented in Bloomberg::quantum::Future< T >.
BufferRetType< V > Bloomberg::quantum::ICoroFuture< T >::pull | ( | ICoroSync::Ptr | sync, |
bool & | isBufferClosed | ||
) |
Pull a single value from the future buffer.
[in] | sync | Pointer to the coroutine synchronization object. |
[out] | isBufferClosed | Indicates if this buffer is closed and no more Pull operations are allowed on it. |
Implemented in Bloomberg::quantum::Future< T >.