Closed Pointerbender closed 1 year ago
Hi! This PR was approved a few weeks ago but it is not yet merged. Is this delayed intentionally until the next release (where PRs are then cherry-picked and merged for release) or should it be merged already? :)
We normally merge things immediately. I've gone ahead and merged your PR>
Thank you!
This PR contains a minor 2 line fix for a corner case where a
RwLock
could erroneously be acquired in write mode while already being write locked. This led to a panic sayingloom::RwLock state corrupt: "WouldBlock"
, while it instead should return theWouldBlock
error state onRwLock::try_write
or (potentially) signal a deadlock when callingRwLock::write
. I also took the liberty of adding some more test cases forRwLock
, which will also detect any regressions of this bug.