QuantumLibrary
Bloomberg::quantum::SharedState< T > Class Template Reference

Shared state used between a Promise and a Future to exchange values. More...

#include <quantum_shared_state.h>

Public Member Functions

template<class V = T>
int set (V &&value)
 
template<class V = T>
int set (ICoroSync::Ptr sync, V &&value)
 
get ()
 
get (ICoroSync::Ptr sync)
 
const T & getRef () const
 
const T & getRef (ICoroSync::Ptr sync) const
 
void breakPromise ()
 
void wait () const
 
void wait (ICoroSync::Ptr sync) const
 
template<class REP , class PERIOD >
std::future_status waitFor (const std::chrono::duration< REP, PERIOD > &time) const
 
template<class REP , class PERIOD >
std::future_status waitFor (ICoroSync::Ptr sync, const std::chrono::duration< REP, PERIOD > &time) const
 
int setException (std::exception_ptr ex)
 
int setException (ICoroSync::Ptr sync, std::exception_ptr ex)
 

Friends

class Promise< T >
 

Detailed Description

template<class T>
class Bloomberg::quantum::SharedState< T >

Shared state used between a Promise and a Future to exchange values.

Note
For internal use only.

Member Function Documentation

◆ breakPromise()

template<class T >
void Bloomberg::quantum::SharedState< T >::breakPromise ( )

◆ get() [1/2]

template<class T >
T Bloomberg::quantum::SharedState< T >::get ( )

◆ get() [2/2]

template<class T >
T Bloomberg::quantum::SharedState< T >::get ( ICoroSync::Ptr  sync)

◆ getRef() [1/2]

template<class T >
const T & Bloomberg::quantum::SharedState< T >::getRef ( ) const

◆ getRef() [2/2]

template<class T >
const T & Bloomberg::quantum::SharedState< T >::getRef ( ICoroSync::Ptr  sync) const

◆ set() [1/2]

template<class T >
template<class V >
int Bloomberg::quantum::SharedState< T >::set ( V &&  value)

◆ set() [2/2]

template<class T >
template<class V >
int Bloomberg::quantum::SharedState< T >::set ( ICoroSync::Ptr  sync,
V &&  value 
)

◆ setException() [1/2]

template<class T >
int Bloomberg::quantum::SharedState< T >::setException ( std::exception_ptr  ex)

◆ setException() [2/2]

template<class T >
int Bloomberg::quantum::SharedState< T >::setException ( ICoroSync::Ptr  sync,
std::exception_ptr  ex 
)

◆ wait() [1/2]

template<class T >
void Bloomberg::quantum::SharedState< T >::wait ( ) const

◆ wait() [2/2]

template<class T >
void Bloomberg::quantum::SharedState< T >::wait ( ICoroSync::Ptr  sync) const

◆ waitFor() [1/2]

template<class T >
template<class REP , class PERIOD >
std::future_status Bloomberg::quantum::SharedState< T >::waitFor ( const std::chrono::duration< REP, PERIOD > &  time) const

◆ waitFor() [2/2]

template<class T >
template<class REP , class PERIOD >
std::future_status Bloomberg::quantum::SharedState< T >::waitFor ( ICoroSync::Ptr  sync,
const std::chrono::duration< REP, PERIOD > &  time 
) const

Friends And Related Function Documentation

◆ Promise< T >

template<class T >
friend class Promise< T >
friend