tetl 0.1.0
Embedded Template Library
|
The struct lock_guard is a mutex wrapper that provides a convenient RAII-style mechanism for owning a mutex for the duration of a scoped block. When a lock_guard object is created, it attempts to take ownership of the mutex it is given. When control leaves the scope in which the lock_guard object was created, the lock_guard is destructed and the mutex is released. The lock_guard struct is non-copyable. More...
#include <lock_guard.hpp>
Public Types | |
using | mutex_type = MutexT |
Public Member Functions | |
lock_guard (lock_guard const &)=delete | |
lock_guard (mutex_type &m) | |
lock_guard (mutex_type &m, adopt_lock_t) | |
~lock_guard () | |
auto | operator= (lock_guard const &) -> lock_guard &=delete |
The struct lock_guard is a mutex wrapper that provides a convenient RAII-style mechanism for owning a mutex for the duration of a scoped block. When a lock_guard object is created, it attempts to take ownership of the mutex it is given. When control leaves the scope in which the lock_guard object was created, the lock_guard is destructed and the mutex is released. The lock_guard struct is non-copyable.
|
inlineexplicit |
|
inline |
|
inline |
|
delete |
|
delete |