Skip to content

Commit

Permalink
Remove std::call_once wrapper around JFactory::Init
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nathanwbrei committed Apr 18, 2024
1 parent df65224 commit e745f43
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/libraries/JANA/JFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void JFactory::Create(const std::shared_ptr<const JEvent>& event) {

if (mStatus == Status::Uninitialized) {
try {
std::call_once(mInitFlag, &JFactory::Init, this);
Init();
mStatus = Status::Unprocessed;
}
catch (JException& ex) {
Expand Down
3 changes: 0 additions & 3 deletions src/libraries/JANA/JFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e745f43

Please sign in to comment.