From b790329221df930f2cd0af2d5a0eb5ffa5c0c880 Mon Sep 17 00:00:00 2001 From: Igor Date: Mon, 25 Nov 2024 14:17:52 +0200 Subject: [PATCH] [4.4.4] [ioc] fixed Inject get method --- .../global/thirdparty/kors_modularity/modularity/ioc.cpp | 2 +- .../global/thirdparty/kors_modularity/modularity/ioc.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/framework/global/thirdparty/kors_modularity/modularity/ioc.cpp b/src/framework/global/thirdparty/kors_modularity/modularity/ioc.cpp index 26eeca4cac733..ade1abf75c8fa 100644 --- a/src/framework/global/thirdparty/kors_modularity/modularity/ioc.cpp +++ b/src/framework/global/thirdparty/kors_modularity/modularity/ioc.cpp @@ -23,7 +23,7 @@ SOFTWARE. */ #include "ioc.h" -std::mutex kors::modularity::StaticMutex::mutex; +std::recursive_mutex kors::modularity::StaticMutex::mutex; static std::map s_map; diff --git a/src/framework/global/thirdparty/kors_modularity/modularity/ioc.h b/src/framework/global/thirdparty/kors_modularity/modularity/ioc.h index d09960068989a..0f3f012d14a9c 100644 --- a/src/framework/global/thirdparty/kors_modularity/modularity/ioc.h +++ b/src/framework/global/thirdparty/kors_modularity/modularity/ioc.h @@ -37,7 +37,7 @@ void removeIoC(const ContextPtr& ctx = nullptr); struct StaticMutex { - static std::mutex mutex; + static std::recursive_mutex mutex; }; template @@ -74,7 +74,7 @@ class Inject const std::shared_ptr& get() const { if (!m_i) { - const std::lock_guard lock(StaticMutex::mutex); + const std::lock_guard lock(StaticMutex::mutex); if (!m_i) { static std::string_view module = ""; m_i = _ioc(iocContext())->template resolve(module);