mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Merge pull request #348 from WarheadCore/mutex
feat(GlobalMethods/AzerothCore): switch to new threading system
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#include "BindingMap.h"
|
||||
|
||||
#ifdef AZEROTHCORE
|
||||
|
||||
#include "BanManager.h"
|
||||
|
||||
enum BanMode
|
||||
{
|
||||
BAN_ACCOUNT = 1,
|
||||
@@ -198,10 +200,8 @@ namespace LuaGlobalFunctions
|
||||
});
|
||||
#else
|
||||
{
|
||||
#ifdef TRINITY
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
std::shared_lock<std::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
||||
#elif defined(AZEROTHCORE)
|
||||
ACORE_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||
#else
|
||||
HashMapHolder<Player>::ReadGuard g(HashMapHolder<Player>::GetLock());
|
||||
#endif
|
||||
|
||||
@@ -36,10 +36,8 @@ namespace LuaGuild
|
||||
});
|
||||
#else
|
||||
{
|
||||
#ifdef TRINITY
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
std::shared_lock<std::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
||||
#elif defined(AZEROTHCORE)
|
||||
ACORE_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||
#else
|
||||
HashMapHolder<Player>::ReadGuard g(HashMapHolder<Player>::GetLock());
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user