From e745f43838f77b81a289336f40bd9db99f97f241 Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Thu, 18 Apr 2024 00:30:44 -0400 Subject: [PATCH] Remove std::call_once wrapper around JFactory::Init This doesn't make our factories safer or more correct, and may be responsible for the very simple test case that mysteriously hangs, but only during the Docker CI job. --- src/libraries/JANA/JFactory.cc | 2 +- src/libraries/JANA/JFactory.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libraries/JANA/JFactory.cc b/src/libraries/JANA/JFactory.cc index f5ffae1a2..d19980f6e 100644 --- a/src/libraries/JANA/JFactory.cc +++ b/src/libraries/JANA/JFactory.cc @@ -14,7 +14,7 @@ void JFactory::Create(const std::shared_ptr& event) { if (mStatus == Status::Uninitialized) { try { - std::call_once(mInitFlag, &JFactory::Init, this); + Init(); mStatus = Status::Unprocessed; } catch (JException& ex) { diff --git a/src/libraries/JANA/JFactory.h b/src/libraries/JANA/JFactory.h index cabaa9930..af360e4d7 100644 --- a/src/libraries/JANA/JFactory.h +++ b/src/libraries/JANA/JFactory.h @@ -202,9 +202,6 @@ class JFactory { CreationStatus mCreationStatus = CreationStatus::NotCreatedYet; - // Used to make sure Init is called only once - std::once_flag mInitFlag; - // Common to components JEventLevel mLevel = JEventLevel::Event; std::string mPluginName;