MySQL 9.0.0
Source Code Documentation
Partitioned_rwlock_write_guard Class Reference

Write lock guard class for Partitioned_rwlock. More...

#include <partitioned_rwlock.h>

Public Member Functions

 Partitioned_rwlock_write_guard (Partitioned_rwlock *rwlock)
 Acquires write lock on partitioned rwlock. More...
 
 ~Partitioned_rwlock_write_guard ()
 
void unlock ()
 Release write lock. More...
 

Private Member Functions

 Partitioned_rwlock_write_guard (const Partitioned_rwlock_write_guard &)
 
Partitioned_rwlock_write_guardoperator= (const Partitioned_rwlock_write_guard &)
 

Private Attributes

Partitioned_rwlockm_rwlock
 Pointer to partitioned rwlock which was acquired. More...
 

Detailed Description

Write lock guard class for Partitioned_rwlock.

Supports early unlocking.

Constructor & Destructor Documentation

◆ Partitioned_rwlock_write_guard() [1/2]

Partitioned_rwlock_write_guard::Partitioned_rwlock_write_guard ( Partitioned_rwlock rwlock)
inlineexplicit

Acquires write lock on partitioned rwlock.

Automatically release it in destructor.

◆ ~Partitioned_rwlock_write_guard()

Partitioned_rwlock_write_guard::~Partitioned_rwlock_write_guard ( )
inline

◆ Partitioned_rwlock_write_guard() [2/2]

Partitioned_rwlock_write_guard::Partitioned_rwlock_write_guard ( const Partitioned_rwlock_write_guard )
private

Member Function Documentation

◆ operator=()

Partitioned_rwlock_write_guard & Partitioned_rwlock_write_guard::operator= ( const Partitioned_rwlock_write_guard )
private

◆ unlock()

void Partitioned_rwlock_write_guard::unlock ( )
inline

Release write lock.

Optional method for early unlocking.

Member Data Documentation

◆ m_rwlock

Partitioned_rwlock* Partitioned_rwlock_write_guard::m_rwlock
private

Pointer to partitioned rwlock which was acquired.

NULL if lock was released early so destructor should not do anything.


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