Commit 2d514f65 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Restore mutex to protect GaudiCommon::m_countersOwn (!839)

Closes #59
parents 8a169955 a21a2dcf
...@@ -508,6 +508,7 @@ public: ...@@ -508,6 +508,7 @@ public:
return const_cast<GaudiCommon<PBASE>*>( this )->counter( tag ); return const_cast<GaudiCommon<PBASE>*>( this )->counter( tag );
} }
inline StatEntity& counter( const std::string& tag ) { inline StatEntity& counter( const std::string& tag ) {
std::lock_guard<std::mutex> lock( m_countersOwnMutex );
// Return referenced StatEntity if it already exists, else create it // Return referenced StatEntity if it already exists, else create it
auto p = this->findCounter( tag ); auto p = this->findCounter( tag );
if ( !p ) { if ( !p ) {
...@@ -738,6 +739,8 @@ private: ...@@ -738,6 +739,8 @@ private:
mutable Counter m_exceptions; mutable Counter m_exceptions;
/// General counters /// General counters
StatisticsOwn m_countersOwn; StatisticsOwn m_countersOwn;
/// The mutex for m_countersOwn
std::mutex m_countersOwnMutex;
// ========================================================================== // ==========================================================================
/// Pointer to the Update Manager Service instance /// Pointer to the Update Manager Service instance
mutable IUpdateManagerSvc* m_updMgrSvc = nullptr; mutable IUpdateManagerSvc* m_updMgrSvc = nullptr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment