MySQL 8.4.2
Source Code Documentation
WaitableVariable< ValueType > Class Template Reference

#include <wait_variable.h>

Classes

class  DoNothing
 

Public Member Functions

 WaitableVariable ()
 
 WaitableVariable (const ValueType &value)
 
template<typename Container = std::initializer_list<ValueType>, typename Callback = DoNothing>
bool exchange (const Container &expected, const ValueType &v, const Callback &after_set_callback=DoNothing())
 
template<typename Callback = DoNothing>
bool exchange (const ValueType &expected, const ValueType &v, const Callback &after_set_callback=DoNothing())
 
template<typename Callback = DoNothing>
ValueType get (const Callback &after_get_callback=DoNothing())
 
template<typename Callback = DoNothing>
void set (const ValueType &v, const Callback &after_set_callback=DoNothing())
 
template<typename Callback >
void change (const Callback &set_callback)
 
template<typename Callback = DoNothing>
bool is (std::initializer_list< ValueType > expected_values, const Callback &after_is_callback=Callback())
 
template<typename Callback = DoNothing>
bool is (const ValueType &expected_value, const Callback &after_is_callback=Callback())
 
template<typename Callback = DoNothing>
void wait (const ValueType &expected_value, const Callback &callback=Callback())
 
template<typename Callback = DoNothing>
ValueType wait (std::initializer_list< ValueType > expected_values, const Callback &callback=Callback())
 
template<class Rep , class Period , typename Callback = DoNothing>
bool wait_for (const std::chrono::duration< Rep, Period > &rel_time, const ValueType &expected_value, const Callback &callback=Callback())
 
template<class Rep , class Period , typename Callback = DoNothing>
stdx::expected< ValueType, bool > wait_for (const std::chrono::duration< Rep, Period > &rel_time, std::initializer_list< ValueType > expected_values, const Callback &callback=Callback())
 

Private Attributes

WaitableMonitor< ValueType > monitor_with_value_ {}
 

Constructor & Destructor Documentation

◆ WaitableVariable() [1/2]

template<typename ValueType >
WaitableVariable< ValueType >::WaitableVariable ( )
inline

◆ WaitableVariable() [2/2]

template<typename ValueType >
WaitableVariable< ValueType >::WaitableVariable ( const ValueType &  value)
inline

Member Function Documentation

◆ change()

template<typename ValueType >
template<typename Callback >
void WaitableVariable< ValueType >::change ( const Callback set_callback)
inline

◆ exchange() [1/2]

template<typename ValueType >
template<typename Container = std::initializer_list<ValueType>, typename Callback = DoNothing>
bool WaitableVariable< ValueType >::exchange ( const Container &  expected,
const ValueType &  v,
const Callback after_set_callback = DoNothing() 
)
inline

◆ exchange() [2/2]

template<typename ValueType >
template<typename Callback = DoNothing>
bool WaitableVariable< ValueType >::exchange ( const ValueType &  expected,
const ValueType &  v,
const Callback after_set_callback = DoNothing() 
)
inline

◆ get()

template<typename ValueType >
template<typename Callback = DoNothing>
ValueType WaitableVariable< ValueType >::get ( const Callback after_get_callback = DoNothing())
inline

◆ is() [1/2]

template<typename ValueType >
template<typename Callback = DoNothing>
bool WaitableVariable< ValueType >::is ( const ValueType &  expected_value,
const Callback after_is_callback = Callback() 
)
inline

◆ is() [2/2]

template<typename ValueType >
template<typename Callback = DoNothing>
bool WaitableVariable< ValueType >::is ( std::initializer_list< ValueType >  expected_values,
const Callback after_is_callback = Callback() 
)
inline

◆ set()

template<typename ValueType >
template<typename Callback = DoNothing>
void WaitableVariable< ValueType >::set ( const ValueType &  v,
const Callback after_set_callback = DoNothing() 
)
inline

◆ wait() [1/2]

template<typename ValueType >
template<typename Callback = DoNothing>
void WaitableVariable< ValueType >::wait ( const ValueType &  expected_value,
const Callback callback = Callback() 
)
inline

◆ wait() [2/2]

template<typename ValueType >
template<typename Callback = DoNothing>
ValueType WaitableVariable< ValueType >::wait ( std::initializer_list< ValueType >  expected_values,
const Callback callback = Callback() 
)
inline

◆ wait_for() [1/2]

template<typename ValueType >
template<class Rep , class Period , typename Callback = DoNothing>
bool WaitableVariable< ValueType >::wait_for ( const std::chrono::duration< Rep, Period > &  rel_time,
const ValueType &  expected_value,
const Callback callback = Callback() 
)
inline

◆ wait_for() [2/2]

template<typename ValueType >
template<class Rep , class Period , typename Callback = DoNothing>
stdx::expected< ValueType, bool > WaitableVariable< ValueType >::wait_for ( const std::chrono::duration< Rep, Period > &  rel_time,
std::initializer_list< ValueType >  expected_values,
const Callback callback = Callback() 
)
inline

Member Data Documentation

◆ monitor_with_value_

template<typename ValueType >
WaitableMonitor<ValueType> WaitableVariable< ValueType >::monitor_with_value_ {}
private

The documentation for this class was generated from the following file: