QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
Loading...
Searching...
No Matches
quickcpplib::_xxx::configurable_spinlock::lock_guard< T > Class Template Reference

#include "spinlock.hpp"

Public Types

using mutex_type = T

Public Member Functions

 lock_guard (mutex_type &m) noexcept
 lock_guard (mutex_type &&m) noexcept
 lock_guard (const lock_guard &)=delete
 lock_guard (lock_guard &&o) noexcept
 ~lock_guard ()

Member Typedef Documentation

◆ mutex_type

template<class T>
using quickcpplib::_xxx::configurable_spinlock::lock_guard< T >::mutex_type = T

Constructor & Destructor Documentation

◆ lock_guard() [1/4]

template<class T>
quickcpplib::_xxx::configurable_spinlock::lock_guard< T >::lock_guard ( mutex_type & m)
inlineexplicitnoexcept
60 : _m(&m)
61 {
62 _m->lock();
63 }

◆ lock_guard() [2/4]

template<class T>
quickcpplib::_xxx::configurable_spinlock::lock_guard< T >::lock_guard ( mutex_type && m)
inlineexplicitnoexcept
65 : _m(&m)
66 {
67 _m->lock();
68 }

◆ lock_guard() [3/4]

template<class T>
quickcpplib::_xxx::configurable_spinlock::lock_guard< T >::lock_guard ( const lock_guard< T > & )
delete

◆ lock_guard() [4/4]

template<class T>
quickcpplib::_xxx::configurable_spinlock::lock_guard< T >::lock_guard ( lock_guard< T > && o)
inlinenoexcept
71 : _m(std::move(o._m))
72 {
73 o._m = nullptr;
74 }

◆ ~lock_guard()

76 {
77 if(_m)
78 _m->unlock();
79 }

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