Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
msotheeswaran-sc committed Oct 3, 2023
1 parent d6aeaf9 commit 98ff535
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/readwritelock.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class readWriteLock {
while (m_readCount > 0)
m_cv.wait(rm);
if (exclusive) {
/* Another thread might have the write lock while we have the read lock
but won't be able to release it until they can acquire the read lock
so release the read lock and try again instead of waiting to avoid deadlock */
/* Another thread might have the write lock while we have the internal lock
but won't be able to release it until they can acquire the internal lock
so release the internal lock and try again instead of waiting to avoid deadlock */
while(!m_writeLock.try_lock())
m_cv.wait(rm);
}
Expand Down

0 comments on commit 98ff535

Please sign in to comment.