From de1642b4e0d67421e839e66d39945f02dac02202 Mon Sep 17 00:00:00 2001 From: SoftSquirrel Date: Mon, 17 Apr 2023 10:10:26 +0800 Subject: [PATCH] =?UTF-8?q?Issue:#I6W6R9=20Description:FFRT=EF=BC=88change?= =?UTF-8?q?=20recursive=5Fmutex=20to=20mutex=EF=BC=89=20Sig:=20SIG=5FAppli?= =?UTF-8?q?caitonFramework=20Feature=20or=20Bugfix:=20Feature=20Binary=20S?= =?UTF-8?q?ource:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SoftSquirrel --- services/dbms/include/distributed_data_storage.h | 2 +- services/dbms/src/distributed_data_storage.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/dbms/include/distributed_data_storage.h b/services/dbms/include/distributed_data_storage.h index 0f7596a..11fd926 100644 --- a/services/dbms/include/distributed_data_storage.h +++ b/services/dbms/include/distributed_data_storage.h @@ -49,7 +49,7 @@ private: int32_t GetUdidByNetworkId(const std::string &networkId, std::string &udid); bool InnerSaveStorageDistributeInfo(const DistributedBundleInfo &distributedBundleInfo); private: - static std::recursive_mutex mutex_; + static std::mutex mutex_; static std::shared_ptr instance_; const DistributedKv::AppId appId_ {Constants::APP_ID}; diff --git a/services/dbms/src/distributed_data_storage.cpp b/services/dbms/src/distributed_data_storage.cpp index 6d1dc6f..3df550c 100644 --- a/services/dbms/src/distributed_data_storage.cpp +++ b/services/dbms/src/distributed_data_storage.cpp @@ -38,12 +38,12 @@ const uint32_t DEVICE_UDID_LENGTH = 65; } // namespace std::shared_ptr DistributedDataStorage::instance_ = nullptr; -std::recursive_mutex DistributedDataStorage::mutex_; +std::mutex DistributedDataStorage::mutex_; std::shared_ptr DistributedDataStorage::GetInstance() { if (instance_ == nullptr) { - std::lock_guard lock_l(mutex_); + std::lock_guard lock_l(mutex_); if (instance_ == nullptr) { instance_ = std::make_shared(); } -- Gitee