MySQL 8.0.40
Source Code Documentation
minimal_chassis::rwlock_scoped_lock Class Reference

Locks RW-lock and releases lock on scope exit. More...

#include <rwlock_scoped_lock.h>

Public Member Functions

 rwlock_scoped_lock (mysql_rwlock_t *lock, bool lock_for_write, const char *file, int line)
 Acquires lock on specified lock object. More...
 
 rwlock_scoped_lock (rwlock_scoped_lock &&lock)
 Moves lock from another object. More...
 
 rwlock_scoped_lock (const rwlock_scoped_lock &)=delete
 
 ~rwlock_scoped_lock ()
 
rwlock_scoped_lockoperator= (const rwlock_scoped_lock &)=delete
 

Private Attributes

mysql_rwlock_tm_lock
 

Detailed Description

Locks RW-lock and releases lock on scope exit.

Constructor & Destructor Documentation

◆ rwlock_scoped_lock() [1/3]

rwlock_scoped_lock::rwlock_scoped_lock ( mysql_rwlock_t lock,
bool  lock_for_write,
const char *  file,
int  line 
)

Acquires lock on specified lock object.

The lock may be NULL, in which case this is a no-op.

Parameters
lockLock object to lock.
lock_for_writeSpecifies if to lock for write or read.
fileFile in which lock acquisition is to be presented.
lineLine of file in which lock acquisition is to be presented.

◆ rwlock_scoped_lock() [2/3]

rwlock_scoped_lock::rwlock_scoped_lock ( minimal_chassis::rwlock_scoped_lock &&  lock)

Moves lock from another object.

Parameters
lockScoped lock object to move from.

◆ rwlock_scoped_lock() [3/3]

minimal_chassis::rwlock_scoped_lock::rwlock_scoped_lock ( const rwlock_scoped_lock )
delete

◆ ~rwlock_scoped_lock()

rwlock_scoped_lock::~rwlock_scoped_lock ( )

Member Function Documentation

◆ operator=()

rwlock_scoped_lock & minimal_chassis::rwlock_scoped_lock::operator= ( const rwlock_scoped_lock )
delete

Member Data Documentation

◆ m_lock

mysql_rwlock_t* minimal_chassis::rwlock_scoped_lock::m_lock
private

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