From d9517a5def0da0d891f520ab0baa90dd1f01ec9b Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Fri, 13 Mar 2026 16:30:36 -0500 Subject: [PATCH] Make cfgfile depth calculation thread friendly --- src/config.cpp | 2 ++ src/config.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.cpp b/src/config.cpp index 6569ca4b..6bddbc8d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -46,6 +46,8 @@ constexpr static const char CACHE_FILES_PROCESS_NAMES_DEFAULT[] = Config cfg; +thread_local int Config::CfgConfigFile::_depth = 0; + Config::CfgConfigFile::CfgConfigFile() { } diff --git a/src/config.hpp b/src/config.hpp index 50b2d096..10637896 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -95,7 +95,7 @@ public: { private: fs::path _cfg_file; - int _depth = 0; + static thread_local int _depth; public: CfgConfigFile();