MySQL 8.0.40
Source Code Documentation
Rdlock_guard< Rd_lockable > Class Template Reference

Generic sentry class for read locking. More...

#include <read_write_lock_guard.h>

Inheritance diagram for Rdlock_guard< Rd_lockable >:
[legend]

Public Member Functions

 Rdlock_guard (Rd_lockable &lock)
 Constructor for the class that creates a sentry that will unlock the callable object on destruction and then read locks the object. More...
 
virtual ~Rdlock_guard () override=default
 
- Public Member Functions inherited from raii::Sentry< F >
 Sentry (F dispose)
 Constructor for the class that stores the callable object passed as argument, to be invoked upon disposal of the object. More...
 
virtual ~Sentry ()
 Destructor for the class. More...
 

Detailed Description

template<typename Rd_lockable>
class Rdlock_guard< Rd_lockable >

Generic sentry class for read locking.

For the given callable type the class assumes a read lock can be acquired with rdlock() in the constructor. On deletion the class will unlock with an unlock() invocation

Constructor & Destructor Documentation

◆ Rdlock_guard()

template<typename Rd_lockable >
Rdlock_guard< Rd_lockable >::Rdlock_guard ( Rd_lockable &  lock)
inline

Constructor for the class that creates a sentry that will unlock the callable object on destruction and then read locks the object.

Parameters
lockThe callable object to be locked/unlocked

◆ ~Rdlock_guard()

template<typename Rd_lockable >
virtual Rdlock_guard< Rd_lockable >::~Rdlock_guard ( )
overridevirtualdefault

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