diff --git a/include/spdlog/async.h b/include/spdlog/async.h index c2071834..f70c4a3e 100644 --- a/include/spdlog/async.h +++ b/include/spdlog/async.h @@ -41,7 +41,7 @@ struct async_factory_impl { auto ®istry_inst = details::registry::instance(); - //create global thread pool if not already exists.. + // create global thread pool if not already exists.. std::lock_guard(registry_inst.tp_mutex()); auto tp = registry_inst.get_tp(); if (tp == nullptr) diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index 982a39e3..b3db19a2 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -72,7 +72,6 @@ public: tp_ = std::move(tp); } - std::shared_ptr get_tp() { std::lock_guard lock(tp_mutex_); @@ -173,7 +172,7 @@ public: } } - std::recursive_mutex &tp_mutex() + std::recursive_mutex &tp_mutex() { return tp_mutex_; } @@ -183,7 +182,6 @@ public: static registry s_instance; return s_instance; } - private: registry() @@ -206,7 +204,7 @@ private: } std::mutex logger_map_mutex_, flusher_mutex_; - std::recursive_mutex tp_mutex_; + std::recursive_mutex tp_mutex_; std::unordered_map> loggers_; std::unique_ptr formatter_; level::level_enum level_ = level::info;