mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Misc: Add some documentation to TRINITY_WRITE_GUARD and TRINITY_READ_GUARD because ACE's documentation on underlying objects is not clear.
This commit is contained in:
@@ -208,10 +208,14 @@ typedef std::vector<std::string> StringVector;
|
||||
ACE_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
|
||||
if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
|
||||
|
||||
//! For proper implementation of multiple-read, single-write pattern, use
|
||||
//! ACE_RW_Mutex as underlying @MUTEX
|
||||
# define TRINITY_WRITE_GUARD(MUTEX, LOCK) \
|
||||
ACE_Write_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
|
||||
if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
|
||||
|
||||
//! For proper implementation of multiple-read, single-write pattern, use
|
||||
//! ACE_RW_Mutex as underlying @MUTEX
|
||||
# define TRINITY_READ_GUARD(MUTEX, LOCK) \
|
||||
ACE_Read_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
|
||||
if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
|
||||
|
||||
Reference in New Issue
Block a user