MySQL 8.0.39
Source Code Documentation
Partitioned_rwlock_read_guard Class Reference

Read lock guard class for Partitioned_rwlock. More...

#include <partitioned_rwlock.h>

Public Member Functions

 Partitioned_rwlock_read_guard (Partitioned_rwlock *rwlock, uint thread_id)
 Acquires read lock on partitioned rwlock on behalf of thread. More...
 
 ~Partitioned_rwlock_read_guard ()
 
void unlock ()
 Release read lock. More...
 

Private Member Functions

 Partitioned_rwlock_read_guard (const Partitioned_rwlock_read_guard &)
 
Partitioned_rwlock_read_guardoperator= (const Partitioned_rwlock_read_guard &)
 

Private Attributes

Partitioned_rwlockm_rwlock
 Pointer to partitioned rwlock which was acquired. More...
 
uint m_thread_id
 Id of thread on which behalf lock was acquired and which is to be used for unlocking. More...
 

Detailed Description

Read lock guard class for Partitioned_rwlock.

Supports early unlocking.

Constructor & Destructor Documentation

◆ Partitioned_rwlock_read_guard() [1/2]

Partitioned_rwlock_read_guard::Partitioned_rwlock_read_guard ( Partitioned_rwlock rwlock,
uint  thread_id 
)
inline

Acquires read lock on partitioned rwlock on behalf of thread.

Automatically release lock in destructor.

◆ ~Partitioned_rwlock_read_guard()

Partitioned_rwlock_read_guard::~Partitioned_rwlock_read_guard ( )
inline

◆ Partitioned_rwlock_read_guard() [2/2]

Partitioned_rwlock_read_guard::Partitioned_rwlock_read_guard ( const Partitioned_rwlock_read_guard )
private

Member Function Documentation

◆ operator=()

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

◆ unlock()

void Partitioned_rwlock_read_guard::unlock ( )
inline

Release read lock.

Optional method for early unlocking.

Member Data Documentation

◆ m_rwlock

Partitioned_rwlock* Partitioned_rwlock_read_guard::m_rwlock
private

Pointer to partitioned rwlock which was acquired.

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

◆ m_thread_id

uint Partitioned_rwlock_read_guard::m_thread_id
private

Id of thread on which behalf lock was acquired and which is to be used for unlocking.


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