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
|
||||
{
|
||||
public:
|
||||
ThreadSafeProxy(T& resource, boost::recursive_mutex& mutex)
|
||||
ThreadSafeProxy(T& resource, std::recursive_mutex& mutex)
|
||||
: resourceRef(resource), lock(mutex) {}
|
||||
|
||||
T* operator->() { return &resourceRef; }
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
private:
|
||||
T& resourceRef;
|
||||
std::lock_guard<boost::recursive_mutex> lock;
|
||||
std::lock_guard<std::recursive_mutex> lock;
|
||||
};
|
||||
|
||||
class Zone : public rmg::ZoneOptions
|
||||
@@ -130,8 +130,8 @@ public:
|
||||
|
||||
vstd::RNG & getRand();
|
||||
public:
|
||||
mutable boost::recursive_mutex areaMutex;
|
||||
using Lock = boost::unique_lock<boost::recursive_mutex>;
|
||||
mutable std::recursive_mutex areaMutex;
|
||||
using Lock = boost::unique_lock<std::recursive_mutex>;
|
||||
|
||||
protected:
|
||||
CMapGenerator & generator;
|
||||
|
||||
@@ -62,8 +62,8 @@ protected:
|
||||
|
||||
bool finished = false;
|
||||
|
||||
mutable boost::recursive_mutex externalAccessMutex; //Used to communicate between Modificators
|
||||
using RecursiveLock = boost::unique_lock<boost::recursive_mutex>;
|
||||
mutable std::recursive_mutex externalAccessMutex; //Used to communicate between Modificators
|
||||
using RecursiveLock = boost::unique_lock<std::recursive_mutex>;
|
||||
using Lock = boost::unique_lock<boost::shared_mutex>;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user