From 5881dcc2b296e78570a9df394c28cd836626fb0f Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 15 Mar 2023 09:09:09 +0100 Subject: [PATCH] done reverse unlock in multimutex --- include/boost/unordered/detail/foa/concurrent_table.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index 9b13c12f..a48ed984 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -51,8 +51,8 @@ public: return mutexes[pos]; } - void lock()noexcept{for(auto&m:mutexes)m.lock();} - void unlock()noexcept{for(auto&m:mutexes)m.unlock();} + void lock()noexcept{for(auto& m:mutexes)m.lock();} + void unlock()noexcept{for(auto n=N;n--;)mutexes[n].unlock();} private: mutable std::array mutexes;