MySQL 8.0.40
Source Code Documentation
|
A RAII helper which latches global_latch in shared mode during constructor, and unlatches it during destruction, preventing any other thread from acquiring exclusive latch. More...
#include <lock0guards.h>
Public Member Functions | |
Global_shared_latch_guard (ut::Location location) | |
~Global_shared_latch_guard () | |
bool | is_x_blocked_by_us () |
Checks if there is a thread requesting the global_latch in exclusive mode blocked by our thread. More... | |
Additional Inherited Members | |
Private Member Functions inherited from ut::Non_copyable | |
Non_copyable (const Non_copyable &)=delete | |
Non_copyable & | operator= (const Non_copyable &)=delete |
Non_copyable ()=default | |
~Non_copyable ()=default | |
A RAII helper which latches global_latch in shared mode during constructor, and unlatches it during destruction, preventing any other thread from acquiring exclusive latch.
This should be used in combination Shard_naked_latch_guard, preferably by simply using Shard_latch_guard which combines the two for you.
locksys::Global_shared_latch_guard::Global_shared_latch_guard | ( | ut::Location | location | ) |
locksys::Global_shared_latch_guard::~Global_shared_latch_guard | ( | ) |
bool locksys::Global_shared_latch_guard::is_x_blocked_by_us | ( | ) |
Checks if there is a thread requesting the global_latch in exclusive mode blocked by our thread.