22 #ifndef LELY_UTIL_MUTEX_H_
23 #define LELY_UTIL_MUTEX_H_
56 template <
class Mutex>
An abstract interface conforming to the BasicLockable concept.
virtual void lock()=0
Blocks until a lock can be obtained for the current execution agent (thread, process,...
virtual void unlock()=0
Releases the lock held by the execution agent. Throws no exceptions.
A mutex wrapper that provides a convenient RAII-style mechanism for releasing a mutex for the duratio...
Mutex MutexType
The type of the mutex to unlock.
UnlockGuard(MutexType &m)
Releases ownership of m and calls m.unlock().
~UnlockGuard()
Acquires ownership of m and calls m.lock(), where m is the mutex passed to the constructor.
UnlockGuard(MutexType &m, ::std::adopt_lock_t)
Releases ownership of m without attempting to unlock it.
This header file is part of the Lely libraries; it contains the compiler feature definitions.