CoreComponents 3.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
Guard< T > Class Template Referencefinal

Mutex guard More...

#include <cc/Guard>

Public Member Functions

 Guard (T &mutex)
 Post guard: acquire mutex.
 
 ~Guard ()
 Disband guard: release mutex.
 
void dismiss ()
 Unlock the mutex early.
 
void reinstate ()
 Lock mutex, again.
 

Detailed Description

template<class T>
class cc::Guard< T >

Mutex guard

Template Parameters
TMutex type

Constructor & Destructor Documentation

◆ Guard()

template<class T >
Guard ( T & mutex)
explicit

Post guard: acquire mutex.

◆ ~Guard()

template<class T >
~Guard ( )

Disband guard: release mutex.

Member Function Documentation

◆ dismiss()

template<class T >
void dismiss ( )

Unlock the mutex early.

◆ reinstate()

template<class T >
void reinstate ( )

Lock mutex, again.