MySQL 8.0.39
Source Code Documentation
WaitableMonitor< T > Class Template Reference

Monitor can be waited for. More...

#include <monitor.h>

Inheritance diagram for WaitableMonitor< T >:
[legend]

Public Member Functions

template<class F >
auto serialize_with_cv (F f) const
 
template<class Rep , class Period , class Pred >
auto wait_for (const std::chrono::duration< Rep, Period > &rel_time, Pred pred)
 wait_for time or pred is true. More...
 
template<class Pred >
auto wait (Pred pred) const
 
- Public Member Functions inherited from Monitor< T >
 Monitor (T t)
 
template<class F >
auto operator() (F f) const
 

Private Attributes

std::condition_variable cv_
 

Additional Inherited Members

- Protected Attributes inherited from Monitor< T >
t_
 
std::mutex mtx_
 

Detailed Description

template<class T>
class WaitableMonitor< T >

Monitor can be waited for.

wraps T by with Notifyable to add '.notify_one' to T.

Member Function Documentation

◆ serialize_with_cv()

template<class T >
template<class F >
auto WaitableMonitor< T >::serialize_with_cv ( f) const
inline

◆ wait()

template<class T >
template<class Pred >
auto WaitableMonitor< T >::wait ( Pred  pred) const
inline

◆ wait_for()

template<class T >
template<class Rep , class Period , class Pred >
auto WaitableMonitor< T >::wait_for ( const std::chrono::duration< Rep, Period > &  rel_time,
Pred  pred 
)
inline

wait_for time or pred is true.

Parameters
rel_timetime to wait max
predinvocable that receives the monitored T

Member Data Documentation

◆ cv_

template<class T >
std::condition_variable WaitableMonitor< T >::cv_
mutableprivate

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