Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FWCore/PluginManager/interface/PluginFactoryBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace edmplugin {
std::atomic<void*> m_ptr;
};

typedef tbb::concurrent_vector<PluginMakerInfo> PMakers;
typedef tbb::concurrent_vector<PluginMakerInfo, tbb::zero_allocator<PluginMakerInfo>> PMakers;
typedef tbb::concurrent_unordered_map<std::string, PMakers> Plugins;

// ---------- const member functions ---------------------
Expand Down
4 changes: 4 additions & 0 deletions FWCore/PluginManager/src/PluginFactoryBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ namespace edmplugin {
<< "'\n but was not there. This means the plugin cache is incorrect. Please run 'EdmPluginRefresh " << lib
<< "'";
}
//The item in the container can still be under construction so wait until the m_ptr has been set since that is done last
auto const& value = itFound->second.front();
while (value.m_ptr.load(std::memory_order_acquire) == nullptr) {
}
} else {
//The item in the container can still be under construction so wait until the m_ptr has been set since that is done last
auto const& value = itFound->second.front();
Expand Down
2 changes: 1 addition & 1 deletion FWCore/PluginManager/src/PluginManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ namespace edmplugin {
throw;
}
}
loadables_[p] = ptr;
loadables_.emplace(p, ptr);
justLoaded_(*ptr);
return *ptr;
}
Expand Down