Use read/write thread mx guard instead of general guard for HashMapHolder.

This commit is contained in:
megamage
2011-10-21 17:29:09 -04:00
parent 5fdde0da73
commit c9c5c2a355
5 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -117,8 +117,8 @@ public:
bool first = true;
bool footer = false;
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, *HashMapHolder<Player>::GetLock(), true);
HashMapHolder<Player>::MapType& m = sObjectAccessor->GetPlayers();
ACE_READ_GUARD_RETURN(HashMapHolder<Player>::LockType, guard, *HashMapHolder<Player>::GetLock(), true);
HashMapHolder<Player>::MapType const& m = sObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
AccountTypes itrSec = itr->second->GetSession()->GetSecurity();