libxr 1.0
Want to be the best embedded framework
|
互斥锁的 RAII 机制封装 (RAII-style mechanism for automatic mutex management). More...
#include <mutex.hpp>
Public Member Functions | |
LockGuard (Mutex &mutex) | |
构造函数,自动加锁 (Constructor automatically locking the mutex). | |
~LockGuard () | |
析构函数,自动解锁 (Destructor automatically unlocking the mutex). | |
Private Attributes | |
Mutex & | mutex_ |
被管理的互斥锁 (Reference to the managed mutex). | |
互斥锁的 RAII 机制封装 (RAII-style mechanism for automatic mutex management).
This class ensures that a mutex is locked upon construction and automatically released upon destruction. 该类确保在构造时自动加锁,并在析构时自动释放锁。
|
inline |
构造函数,自动加锁 (Constructor automatically locking the mutex).
mutex | 需要管理的互斥锁 (Reference to the mutex to manage). |
Definition at line 102 of file mutex.hpp.
|
inline |
|
private |