mCRL2
Loading...
Searching...
No Matches
mcrl2::utilities::shared_guard Class Reference

A shared lock guard for the shared_mutex. More...

#include <shared_mutex.h>

Inheritance diagram for mcrl2::utilities::shared_guard:
mcrl2::utilities::noncopyable

Public Member Functions

void lock_shared ()
 Locks the guard again explicitly.
 
void unlock_shared ()
 Unlocks the acquired shared guard explicitly. Otherwise, performed in destructor.
 
 ~shared_guard ()
 

Private Member Functions

 shared_guard (shared_mutex &mutex)
 
- Private Member Functions inherited from mcrl2::utilities::noncopyable
 noncopyable ()=default
 
 noncopyable (const noncopyable &)=delete
 
noncopyableoperator= (const noncopyable &)=delete
 

Private Attributes

shared_mutexm_mutex
 
bool is_locked = true
 

Friends

class shared_mutex
 

Detailed Description

A shared lock guard for the shared_mutex.

Definition at line 31 of file shared_mutex.h.

Constructor & Destructor Documentation

◆ ~shared_guard()

mcrl2::utilities::shared_guard::~shared_guard ( )
inline

Definition at line 43 of file shared_mutex.h.

◆ shared_guard()

mcrl2::utilities::shared_guard::shared_guard ( shared_mutex mutex)
inlineprivate

Definition at line 54 of file shared_mutex.h.

Member Function Documentation

◆ lock_shared()

void mcrl2::utilities::shared_guard::lock_shared ( )
inline

Locks the guard again explicitly.

Definition at line 317 of file shared_mutex.h.

◆ unlock_shared()

void mcrl2::utilities::shared_guard::unlock_shared ( )
inline

Unlocks the acquired shared guard explicitly. Otherwise, performed in destructor.

Definition at line 325 of file shared_mutex.h.

Friends And Related Symbol Documentation

◆ shared_mutex

friend class shared_mutex
friend

Definition at line 52 of file shared_mutex.h.

Member Data Documentation

◆ is_locked

bool mcrl2::utilities::shared_guard::is_locked = true
private

Definition at line 59 of file shared_mutex.h.

◆ m_mutex

shared_mutex& mcrl2::utilities::shared_guard::m_mutex
private

Definition at line 58 of file shared_mutex.h.


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