MySQL 8.4.2
Source Code Documentation
locksys::Global_shared_latch_guard Class Reference

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>

Inheritance diagram for locksys::Global_shared_latch_guard:
[legend]

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_copyableoperator= (const Non_copyable &)=delete
 
 Non_copyable ()=default
 
 ~Non_copyable ()=default
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Global_shared_latch_guard()

locksys::Global_shared_latch_guard::Global_shared_latch_guard ( ut::Location  location)

◆ ~Global_shared_latch_guard()

locksys::Global_shared_latch_guard::~Global_shared_latch_guard ( )

Member Function Documentation

◆ is_x_blocked_by_us()

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.

Returns
true iff there is an x-latcher blocked by our s-latch.

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