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

An exclusive lock guard for the shared_mutex. More...

#include <shared_mutex.h>

Inheritance diagram for mcrl2::utilities::lock_guard:
mcrl2::utilities::noncopyable

Public Member Functions

void unlock ()
 Unlocks the acquired shared guard explicitly. Otherwise, performed in destructor.
 
 ~lock_guard ()
 

Private Member Functions

 lock_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

An exclusive lock guard for the shared_mutex.

Definition at line 63 of file shared_mutex.h.

Constructor & Destructor Documentation

◆ ~lock_guard()

mcrl2::utilities::lock_guard::~lock_guard ( )
inline

Definition at line 69 of file shared_mutex.h.

◆ lock_guard()

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

Definition at line 80 of file shared_mutex.h.

Member Function Documentation

◆ unlock()

void mcrl2::utilities::lock_guard::unlock ( )
inline

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

Definition at line 332 of file shared_mutex.h.

Friends And Related Symbol Documentation

◆ shared_mutex

friend class shared_mutex
friend

Definition at line 78 of file shared_mutex.h.

Member Data Documentation

◆ is_locked

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

Definition at line 85 of file shared_mutex.h.

◆ m_mutex

shared_mutex& mcrl2::utilities::lock_guard::m_mutex
private

Definition at line 84 of file shared_mutex.h.


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