Defensive asserts for RWLock
This commit is contained in:
parent
ebaa5407b5
commit
05bfd007f3
@ -65,6 +65,7 @@ public:
|
||||
void releaseRead() {
|
||||
std::unique_lock<fastlock> rm(m_readLock);
|
||||
m_readCount--;
|
||||
serverAssert(m_readCount >= 0);
|
||||
m_cv.notify_all();
|
||||
}
|
||||
|
||||
@ -74,6 +75,7 @@ public:
|
||||
if (exclusive)
|
||||
m_writeLock.unlock();
|
||||
m_writeCount--;
|
||||
serverAssert(m_writeCount >= 0);
|
||||
m_cv.notify_all();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user