Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions library/std/src/sync/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ use crate::sys::sync as sys;
/// <details><summary>Potential deadlock example</summary>
///
/// ```text
/// // Thread 1 | // Thread 2
/// let _rg = lock.read(); |
/// | // will block
/// | let _wg = lock.write();
/// // may deadlock |
/// let _rg = lock.read(); |
/// // Thread 1 | // Thread 2
/// let _rg1 = lock.read(); |
/// | // will block
/// | let _wg = lock.write();
/// // may deadlock |
/// let _rg2 = lock.read(); |
/// ```
///
/// </details>
///
/// The type parameter `T` represents the data that this lock protects. It is
Expand Down