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

This commit is contained in:
megamage committed 2011-10-21 17:29:09 -04:00
1 parent 5fdde0da73
commit c9c5c2a355
5 files changed
+26 -26

No files matched your search

+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();