CryReadModifyLock

Class Hierarchy
C++
class CryReadModifyLock;
File

CryThread.h

Description

Sync primitive for multiple reads and exclusive locking change access

Desc: Useful in case if you have rarely modified object that needs to be read quite often from different threads but still need to be exclusively modified sometimes Debug functionality: Can be used for debug-only lock calls, which verify that no simultaneous access is attempted. Use the bDebug argument of LockRead or LockModify, or use the DEBUG_READLOCK or DEBUG_MODIFYLOCK macros. There is no overhead in release builds, if you use the macros, and the lock definition is inside #ifdef _DEBUG.

CryReadModifyLock::m_debugLocked Data Member
C++
mutable bool m_debugLocked;
CryReadModifyLock::m_debugLockStr Data Member
C++
mutable const char* m_debugLockStr;
CryReadModifyLock::m_modifyCount Data Member
C++
mutable volatile int m_modifyCount;
CryReadModifyLock::m_readCount Data Member
C++
mutable volatile int m_readCount;
CryReadModifyLock::m_ReadReleased Data Member
C++
mutable CryEvent m_ReadReleased;
CryReadModifyLock::m_writeLock Data Member
C++
mutable CryCriticalSection m_writeLock;
CryReadModifyLock::CryReadModifyLock Constructor
C++
CryReadModifyLock();
CryReadModifyLock::LockModify Method
C++
bool LockModify(bool bTry = false, cstr strDebug = 0, bool bDebug = false) const;
CryReadModifyLock::LockRead Method
C++
bool LockRead(bool bTry = false, cstr strDebug = 0, bool bDebug = false) const;
CryReadModifyLock::SetDebugLocked Method
C++
void SetDebugLocked(bool b, const char* str = 0) const;
CryReadModifyLock::UnlockModify Method
C++
void UnlockModify() const;
CryReadModifyLock::UnlockRead Method
C++
void UnlockRead() const;
CryReadModifyLock::WriteLock Method
C++
bool WriteLock(bool bTry, bool bDebug, const char* strDebug) const;