MySQL 9.1.0
Source Code Documentation
Wrlock_guard< Wr_lockable > Class Template Reference

Generic sentry class for write locking. More...

#include <read_write_lock_guard.h>

Inheritance diagram for Wrlock_guard< Wr_lockable >:
[legend]

Public Member Functions

 Wrlock_guard (Wr_lockable &lock)
 Constructor for the class that creates a sentry that will unlock the callable object on destruction and then write locks the object. More...
 
virtual ~Wrlock_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 Wr_lockable>
class Wrlock_guard< Wr_lockable >

Generic sentry class for write locking.

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

Constructor & Destructor Documentation

◆ Wrlock_guard()

template<typename Wr_lockable >
Wrlock_guard< Wr_lockable >::Wrlock_guard ( Wr_lockable &  lock)
inline

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

Parameters
lockThe callable object to be locked/unlocked

◆ ~Wrlock_guard()

template<typename Wr_lockable >
virtual Wrlock_guard< Wr_lockable >::~Wrlock_guard ( )
overridevirtualdefault

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