We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fbaffd commit 1877714Copy full SHA for 1877714
lightning/src/sync/debug_sync.rs
@@ -327,7 +327,8 @@ impl<T> RwLock<T> {
327
pub fn read<'a>(&'a self) -> LockResult<RwLockReadGuard<'a, T>> {
328
// Note that while we could be taking a recursive read lock here, Rust's `RwLock` may
329
// deadlock trying to take a second read lock if another thread is waiting on the write
330
- // lock. Its platform dependent (but our in-tree `FairRwLock` guarantees this behavior).
+ // lock. This behavior is platform dependent, but our in-tree `FairRwLock` guarantees
331
+ // such a deadlock.
332
LockMetadata::pre_lock(&self.deps, false);
333
self.inner.read().map(|guard| RwLockReadGuard { lock: self, guard }).map_err(|_| ())
334
}
0 commit comments