diff Framework/Common/DatabaseManager.cpp @ 231:0a9b48d19643

removed mutex out of DatabaseManager
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Apr 2021 11:59:31 +0200
parents a4918d57435c
children d1b124d116c1
line wrap: on
line diff
--- a/Framework/Common/DatabaseManager.cpp	Tue Apr 06 11:17:00 2021 +0200
+++ b/Framework/Common/DatabaseManager.cpp	Tue Apr 06 11:59:31 2021 +0200
@@ -164,8 +164,6 @@
   
   void DatabaseManager::StartTransaction(TransactionType type)
   {
-    boost::recursive_mutex::scoped_lock lock(mutex_);
-
     try
     {
       if (transaction_.get() != NULL)
@@ -186,8 +184,6 @@
 
   void DatabaseManager::CommitTransaction()
   {
-    boost::recursive_mutex::scoped_lock lock(mutex_);
-
     if (transaction_.get() == NULL)
     {
       LOG(ERROR) << "Cannot commit a non-existing transaction";
@@ -211,8 +207,6 @@
 
   void DatabaseManager::RollbackTransaction()
   {
-    boost::recursive_mutex::scoped_lock lock(mutex_);
-
     if (transaction_.get() == NULL)
     {
       LOG(ERROR) << "Cannot rollback a non-existing transaction";
@@ -236,7 +230,6 @@
 
   DatabaseManager::Transaction::Transaction(DatabaseManager& manager,
                                             TransactionType type) :
-    lock_(manager.mutex_),
     manager_(manager),
     database_(manager.GetDatabase()),
     committed_(false)
@@ -328,7 +321,6 @@
   
   DatabaseManager::StatementBase::StatementBase(DatabaseManager& manager) :
     manager_(manager),
-    lock_(manager_.mutex_),
     transaction_(manager_.GetTransaction())
   {
   }