feat(Core/Threading): replace ace threading (#4821)

This commit is contained in:
Kargatum
2021-04-17 00:45:29 +07:00
committed by GitHub
parent b9e84d8278
commit b2861be1cd
50 changed files with 300 additions and 342 deletions

View File

@@ -78,9 +78,6 @@
#include "Threading/LockedQueue.h"
#include "Threading/Threading.h"
#include <ace/RW_Thread_Mutex.h>
#include <ace/Thread_Mutex.h>
#include <ace/Stack_Trace.h>
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
@@ -124,8 +121,6 @@ inline float finiteAlways(float f) { return isfinite(f) ? f : 0.0f; }
inline bool myisfinite(float f) { return isfinite(f) && !isnan(f); }
#define atol(a) strtoul( a, nullptr, 10)
#define STRINGIZE(a) #a
#define MAX_NETCLIENT_PACKET_SIZE (32767 - 1) // Client hardcap: int16 with trailing zero space otherwise crash on memory free
@@ -187,22 +182,6 @@ typedef std::vector<std::string> StringVector;
#define MAX_QUERY_LEN 32*1024
#define ACORE_GUARD(MUTEX, LOCK) \
ACE_Guard< MUTEX > ACORE_GUARD_OBJECT (LOCK); \
if (ACORE_GUARD_OBJECT.locked() == 0) ASSERT(false);
//! For proper implementation of multiple-read, single-write pattern, use
//! ACE_RW_Mutex as underlying @MUTEX
# define ACORE_WRITE_GUARD(MUTEX, LOCK) \
ACE_Write_Guard< MUTEX > ACORE_GUARD_OBJECT (LOCK); \
if (ACORE_GUARD_OBJECT.locked() == 0) ASSERT(false);
//! For proper implementation of multiple-read, single-write pattern, use
//! ACE_RW_Mutex as underlying @MUTEX
# define ACORE_READ_GUARD(MUTEX, LOCK) \
ACE_Read_Guard< MUTEX > ACORE_GUARD_OBJECT (LOCK); \
if (ACORE_GUARD_OBJECT.locked() == 0) ASSERT(false);
namespace acore
{
template<class ArgumentType, class ResultType>