MySQL 9.1.0
Source Code Documentation
mysql::condition_variable Class Reference

condition_variable is a C++ STL conditional variable (std::condition_variable) implementation using the instrumented MySQL conditional variable component API. More...

#include <instrumented_condition_variable.h>

Public Member Functions

 condition_variable (PSI_cond_key key)
 
 condition_variable (const condition_variable &)=delete
 
 ~condition_variable ()
 
void notify_one () noexcept
 
void notify_all () noexcept
 
void wait (unique_lock< mutex > &lock)
 
template<class Predicate >
void wait (unique_lock< mutex > &lock, Predicate stop_waiting)
 
template<class Clock , class Duration >
cv_status wait_until (unique_lock< mutex > &lock, const time_point< Clock, Duration > &abs_time)
 

Protected Attributes

PSI_cond_key m_key
 
mysql_cond_t m_cond
 

Detailed Description

condition_variable is a C++ STL conditional variable (std::condition_variable) implementation using the instrumented MySQL conditional variable component API.

This allows for P_S instrumentation of conditional variables in components.

Note
Some methods are missing. Implement as needed.

Example usage:

namespace x {
...
using mysql::condition_varible;
...
condition_variable m(KEY_psi_cond);
...
m.notifyAll(..);
...
};
condition_variable(PSI_cond_key key)
Definition: instrumented_condition_variable.h:65

Constructor & Destructor Documentation

◆ condition_variable() [1/2]

mysql::condition_variable::condition_variable ( PSI_cond_key  key)
inline

◆ condition_variable() [2/2]

mysql::condition_variable::condition_variable ( const condition_variable )
delete

◆ ~condition_variable()

mysql::condition_variable::~condition_variable ( )
inline

Member Function Documentation

◆ notify_all()

void mysql::condition_variable::notify_all ( )
inlinenoexcept

◆ notify_one()

void mysql::condition_variable::notify_one ( )
inlinenoexcept

◆ wait() [1/2]

void mysql::condition_variable::wait ( unique_lock< mutex > &  lock)
inline

◆ wait() [2/2]

template<class Predicate >
void mysql::condition_variable::wait ( unique_lock< mutex > &  lock,
Predicate  stop_waiting 
)
inline

◆ wait_until()

template<class Clock , class Duration >
cv_status mysql::condition_variable::wait_until ( unique_lock< mutex > &  lock,
const time_point< Clock, Duration > &  abs_time 
)
inline

Member Data Documentation

◆ m_cond

mysql_cond_t mysql::condition_variable::m_cond
protected

◆ m_key

PSI_cond_key mysql::condition_variable::m_key
protected

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