mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
replace boost::recursive_mutex with std
This commit is contained in:
@@ -36,7 +36,7 @@ template<typename T>
|
|||||||
class ThreadSafeProxy
|
class ThreadSafeProxy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ThreadSafeProxy(T& resource, boost::recursive_mutex& mutex)
|
ThreadSafeProxy(T& resource, std::recursive_mutex& mutex)
|
||||||
: resourceRef(resource), lock(mutex) {}
|
: resourceRef(resource), lock(mutex) {}
|
||||||
|
|
||||||
T* operator->() { return &resourceRef; }
|
T* operator->() { return &resourceRef; }
|
||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
T& resourceRef;
|
T& resourceRef;
|
||||||
std::lock_guard<boost::recursive_mutex> lock;
|
std::lock_guard<std::recursive_mutex> lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Zone : public rmg::ZoneOptions
|
class Zone : public rmg::ZoneOptions
|
||||||
@@ -130,8 +130,8 @@ public:
|
|||||||
|
|
||||||
vstd::RNG & getRand();
|
vstd::RNG & getRand();
|
||||||
public:
|
public:
|
||||||
mutable boost::recursive_mutex areaMutex;
|
mutable std::recursive_mutex areaMutex;
|
||||||
using Lock = boost::unique_lock<boost::recursive_mutex>;
|
using Lock = boost::unique_lock<std::recursive_mutex>;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CMapGenerator & generator;
|
CMapGenerator & generator;
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ protected:
|
|||||||
|
|
||||||
bool finished = false;
|
bool finished = false;
|
||||||
|
|
||||||
mutable boost::recursive_mutex externalAccessMutex; //Used to communicate between Modificators
|
mutable std::recursive_mutex externalAccessMutex; //Used to communicate between Modificators
|
||||||
using RecursiveLock = boost::unique_lock<boost::recursive_mutex>;
|
using RecursiveLock = boost::unique_lock<std::recursive_mutex>;
|
||||||
using Lock = boost::unique_lock<boost::shared_mutex>;
|
using Lock = boost::unique_lock<boost::shared_mutex>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user