Removed mtmaps OpenMP
Implement mtmaps based on ACE For stable work MapUpdate.Threads=2 in config --HG-- branch : trunk
This commit is contained in:
@@ -52,7 +52,11 @@ class HashMapHolder
|
||||
typedef ACE_Thread_Mutex LockType;
|
||||
typedef MaNGOS::GeneralLock<LockType > Guard;
|
||||
|
||||
static void Insert(T* o) { m_objectMap[o->GetGUID()] = o; }
|
||||
static void Insert(T* o)
|
||||
{
|
||||
Guard guard(i_lock);
|
||||
m_objectMap[o->GetGUID()] = o;
|
||||
}
|
||||
|
||||
static void Remove(T* o)
|
||||
{
|
||||
@@ -62,6 +66,7 @@ class HashMapHolder
|
||||
|
||||
static T* Find(uint64 guid)
|
||||
{
|
||||
Guard guard(i_lock);
|
||||
typename MapType::iterator itr = m_objectMap.find(guid);
|
||||
return (itr != m_objectMap.end()) ? itr->second : NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user