We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
RwLock
1 parent a1b4991 commit 0cd5772Copy full SHA for 0cd5772
library/std/src/sync/rwlock.rs
@@ -31,13 +31,14 @@ use crate::sys::sync as sys;
31
/// <details><summary>Potential deadlock example</summary>
32
///
33
/// ```text
34
-/// // Thread 1 | // Thread 2
35
-/// let _rg = lock.read(); |
36
-/// | // will block
37
-/// | let _wg = lock.write();
38
-/// // may deadlock |
39
+/// // Thread 1 | // Thread 2
+/// let _rg1 = lock.read(); |
+/// | // will block
+/// | let _wg = lock.write();
+/// // may deadlock |
+/// let _rg2 = lock.read(); |
40
/// ```
41
+///
42
/// </details>
43
44
/// The type parameter `T` represents the data that this lock protects. It is
0 commit comments