MySQL 8.0.39
Source Code Documentation
Plugin_waitlock Class Reference

#include <plugin_utils.h>

Public Member Functions

 Plugin_waitlock (mysql_mutex_t *lock, mysql_cond_t *cond, PSI_mutex_key lock_key, PSI_cond_key cond_key)
 Constructor. More...
 
virtual ~Plugin_waitlock ()
 Destructor. More...
 
void set_wait_lock (bool status)
 Set condition to block or unblock the calling threads. More...
 
void start_waitlock ()
 Blocks the calling thread. More...
 
void end_wait_lock ()
 Release the blocked thread. More...
 
bool is_waiting ()
 Checks whether thread should be blocked. More...
 

Private Attributes

mysql_mutex_twait_lock
 the mutex lock for access to class and condition variables More...
 
mysql_cond_twait_cond
 the condition variable calling thread will wait on More...
 
PSI_mutex_key key_lock
 mutex instrumentation key More...
 
PSI_cond_key key_cond
 cond instrumentation key More...
 
bool wait_status
 determine whether calling thread should be blocked or not More...
 

Constructor & Destructor Documentation

◆ Plugin_waitlock()

Plugin_waitlock::Plugin_waitlock ( mysql_mutex_t lock,
mysql_cond_t cond,
PSI_mutex_key  lock_key,
PSI_cond_key  cond_key 
)
inline

Constructor.

Instantiate the mutex lock, mutex condition, mutex and condition key.

Parameters
lockthe mutex lock for access to class and condition variables
condthe condition variable calling thread will wait on
lock_keymutex instrumentation key
cond_keycond instrumentation key

◆ ~Plugin_waitlock()

virtual Plugin_waitlock::~Plugin_waitlock ( )
inlinevirtual

Destructor.

Destroys the mutex and condition objects.

Member Function Documentation

◆ end_wait_lock()

void Plugin_waitlock::end_wait_lock ( )
inline

Release the blocked thread.

◆ is_waiting()

bool Plugin_waitlock::is_waiting ( )
inline

Checks whether thread should be blocked.

Return values
truethread should be blocked
falsethread should not be blocked

◆ set_wait_lock()

void Plugin_waitlock::set_wait_lock ( bool  status)
inline

Set condition to block or unblock the calling threads.

Parameters
[in]statusif the thread should be blocked or not

◆ start_waitlock()

void Plugin_waitlock::start_waitlock ( )
inline

Blocks the calling thread.

Member Data Documentation

◆ key_cond

PSI_cond_key Plugin_waitlock::key_cond
private

cond instrumentation key

◆ key_lock

PSI_mutex_key Plugin_waitlock::key_lock
private

mutex instrumentation key

◆ wait_cond

mysql_cond_t* Plugin_waitlock::wait_cond
private

the condition variable calling thread will wait on

◆ wait_lock

mysql_mutex_t* Plugin_waitlock::wait_lock
private

the mutex lock for access to class and condition variables

◆ wait_status

bool Plugin_waitlock::wait_status
private

determine whether calling thread should be blocked or not


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