mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 23:28:21 +00:00
Switch database mutex to recursive because we copy it everywhere
... and I have no idea if any of the calls are re-entrant. yay.
This commit is contained in:
@@ -76,7 +76,7 @@ void WorldserverCLI::TestDatabaseConcurrency(int argc, char **argv, argh::parser
|
||||
return;
|
||||
}
|
||||
|
||||
std::shared_ptr<std::mutex> sharedMutex = std::make_shared<std::mutex>();
|
||||
std::shared_ptr<DBcore::Mutex> sharedMutex = std::make_shared<DBcore::Mutex>();
|
||||
|
||||
db.SetMutex(sharedMutex);
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ bool WorldBoot::LoadDatabaseConnections()
|
||||
// when database and content_db share the same underlying mysql connection
|
||||
// it needs to be protected by a shared mutex otherwise we produce concurrency issues
|
||||
// when database actions are occurring in different threads
|
||||
std::shared_ptr<std::mutex> sharedMutex = std::make_shared<std::mutex>();
|
||||
std::shared_ptr<DBcore::Mutex> sharedMutex = std::make_shared<DBcore::Mutex>();
|
||||
database.SetMutex(sharedMutex);
|
||||
content_db.SetMutex(sharedMutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user