Zth (libzth)
Loading...
Searching...
No Matches
zth::Locked Class Reference

Mutex RAII, that locks and unlocks the mutex automatically. More...

#include <sync.h>

Public Member Functions

 Locked (Mutex &mutex)
 
 ~Locked ()
 
 Locked (Locked const &)=delete
 
Lockedoperator= (Locked const &)=delete
 
 Locked (Locked &&l) noexcept
 
Lockedoperator= (Locked &&l) noexcept
 

Detailed Description

Mutex RAII, that locks and unlocks the mutex automatically.

Examples
4_sync.cpp.

Definition at line 398 of file sync.h.

Constructor & Destructor Documentation

◆ Locked() [1/3]

zth::Locked::Locked ( Mutex mutex)
inlineexplicit

Definition at line 401 of file sync.h.

◆ ~Locked()

zth::Locked::~Locked ( )
inline

Definition at line 407 of file sync.h.

◆ Locked() [2/3]

zth::Locked::Locked ( Locked const &  )
delete

◆ Locked() [3/3]

zth::Locked::Locked ( Locked &&  l)
inlinenoexcept

Definition at line 417 of file sync.h.

Member Function Documentation

◆ operator=() [1/2]

Locked & zth::Locked::operator= ( Locked &&  l)
inlinenoexcept

Definition at line 423 of file sync.h.

◆ operator=() [2/2]

Locked & zth::Locked::operator= ( Locked const &  )
delete

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