done reverse unlock in multimutex

This commit is contained in:
joaquintides authored and Christian Mazakas committed 2023-03-20 12:43:57 -07:00
1 parent 2070cbe2cc
commit 5881dcc2b2
1 file changed
+2 -2
@@ -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<Mutex,N> mutexes;