We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc25cf3 commit c73b50fCopy full SHA for c73b50f
lightning/src/debug_sync.rs
@@ -213,7 +213,12 @@ impl<T: Sized> Deref for RwLockReadGuard<'_, T> {
213
214
impl<T: Sized> Drop for RwLockReadGuard<'_, T> {
215
fn drop(&mut self) {
216
- if !self.first_lock { return; }
+ if !self.first_lock {
217
+ // Note that its not strictly true that the first taken read lock will get unlocked
218
+ // last, but in practice our locks are always taken as RAII, so it should basically
219
+ // always be true.
220
+ return;
221
+ }
222
MUTEXES_HELD.with(|held| {
223
held.borrow_mut().remove(&self.mutex.deps);
224
});
0 commit comments