MySQL 9.1.0
Source Code Documentation
|
A simple wrapper around a mutex: Grabs the mutex in the CTOR, releases it in the DTOR. More...
#include <mutex_lock.h>
Public Member Functions | |
Generic_mutex_lock () noexcept=default | |
Generic_mutex_lock (MUTEX *mutex, const char *src_file, int src_line) noexcept | |
~Generic_mutex_lock () noexcept | |
Generic_mutex_lock (const Generic_mutex_lock &)=delete | |
Generic_mutex_lock (Generic_mutex_lock &&src) noexcept | |
Generic_mutex_lock & | operator= (const Generic_mutex_lock &)=delete |
Generic_mutex_lock & | operator= (Generic_mutex_lock &&src) noexcept |
Private Attributes | |
MUTEX * | m_mutex = nullptr |
const char * | m_src_file = nullptr |
int | m_src_line = 0 |
A simple wrapper around a mutex: Grabs the mutex in the CTOR, releases it in the DTOR.
The mutex may be NULL, in which case this is a no-op. Templated to allow unit testing with mocked mutex. Not copyable since ownership of a mutex cannot be shared, but movable so that ownership can be transferred to a different Mutex_lock.
|
defaultnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
|
private |
|
private |
|
private |