forked from boostorg/unordered
done reverse unlock in multimutex
This commit is contained in:
committed by
Christian Mazakas
parent
2070cbe2cc
commit
5881dcc2b2
@ -52,7 +52,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void lock()noexcept{for(auto& m:mutexes)m.lock();}
|
void lock()noexcept{for(auto& m:mutexes)m.lock();}
|
||||||
void unlock()noexcept{for(auto&m:mutexes)m.unlock();}
|
void unlock()noexcept{for(auto n=N;n--;)mutexes[n].unlock();}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable std::array<Mutex,N> mutexes;
|
mutable std::array<Mutex,N> mutexes;
|
||||||
|
Reference in New Issue
Block a user