fix possible deadlock when using internal synchronization

This commit is contained in:
greg
2019-04-07 09:14:37 -04:00
parent c6b1328272
commit 6493bd35f6
+1 -2
View File
@@ -2578,8 +2578,7 @@ protected:
{
bool operator==(const Inner& o) const
{
MutexLock_ m1(const_cast<Inner *>(this));
MutexLock_ m2(const_cast<Inner *>(&o)); // deadlock - use std::lock
phmap::scoped_lock<Mutex> l(const_cast<Inner &>(*this), const_cast<Inner &>(o));
return set_ == o.set_;
}