shared_mutex: Optimize busy-waiting by detecting waiters and try to steal the notifying bit
Add an unused has_waiters() method.
This commit is contained in:
@@ -171,6 +171,11 @@ public:
|
||||
{
|
||||
return m_value.load() < c_one - 1;
|
||||
}
|
||||
|
||||
bool has_waiters() const
|
||||
{
|
||||
return m_value.load() > c_one;
|
||||
}
|
||||
};
|
||||
|
||||
// Simplified shared (reader) lock implementation.
|
||||
|
||||
Reference in New Issue
Block a user