From df181a424c0c49610943090a36a6160e4d494a97 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 7 Feb 2019 15:59:00 +0100 Subject: [PATCH] CxxUtils: Fix potential locking issue in ConcurrentRangeMap test. m_inGrace should be protected by the mutex. Only affects the unit test. --- Control/CxxUtils/test/ConcurrentRangeMap_test.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Control/CxxUtils/test/ConcurrentRangeMap_test.cxx b/Control/CxxUtils/test/ConcurrentRangeMap_test.cxx index 41660f6010ee..bd780dfc7b94 100644 --- a/Control/CxxUtils/test/ConcurrentRangeMap_test.cxx +++ b/Control/CxxUtils/test/ConcurrentRangeMap_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* */ @@ -134,8 +134,8 @@ public: void quiescent (int slot) { unsigned int mask = (1<<slot); - if ((m_inGrace & mask) == 0) return; std::lock_guard<std::mutex> g (m_mutex); + if ((m_inGrace & mask) == 0) return; m_inGrace &= ~mask; if (!m_inGrace) { for (T* p : m_garbage) delete p; -- GitLab