The CYIAutoMutex is a helper class that simplifies the locking and unlocking of mutexes based on the RAII principle. The constructor will perform a lock while the destructor automatically perform an unlock.
- See also
- CYIAutoSpinLock
-
CYIAutoReadMutex
-
CYIAutoWriteMutex
-
CYIMutex
-
CYIReadWriteMutex
-
CYISpinLock
#include <thread/YiAutoMutex.h>
| CYIAutoMutex::CYIAutoMutex |
( |
CYIMutex & |
rMutex | ) |
|
|
inline |
Constructs a CYIAutoMutex and performs a lock on the m_rMutex. The CYIAutoMutex will automatically unlock when the instance is destroyed.
| CYIAutoMutex::~CYIAutoMutex |
( |
| ) |
|
|
inline |
Destroys the CYIAutoMutex and unlocks m_rMutex that was locked by the constructor.
| bool CYIAutoMutex::Relock |
( |
| ) |
|
|
inline |
| bool CYIAutoMutex::Unlock |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: