1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Protect public access to Modificators with another mutex.

This commit is contained in:
Tomasz Zieliński
2023-05-07 08:24:08 +02:00
parent a58094aefe
commit 966a24d27e
6 changed files with 28 additions and 4 deletions

View File

@ -62,17 +62,17 @@ protected:
bool finished = false;
//bool wasStarted() const;
mutable boost::shared_mutex externalAccessMutex; //Used to communicate between Modificators
using Lock = boost::unique_lock<boost::shared_mutex>;
private:
virtual void process() = 0;
std::string name;
//bool started = false;
std::list<Modificator*> preceeders; //must be ordered container
mutable boost::shared_mutex mx;
using Lock = boost::unique_lock<boost::shared_mutex>;
mutable boost::shared_mutex mx; //Used only for task scheduling
void dump();
};