rust/library/std/src/sync
Henner Zeller 27f97d7f71 RwLock: refine documentation to emphasize non-reentrancy guarantees
This addresses the need for clarification brought up in an issue.
Specifically, it notes that some implementations may choose to panic if
they detect deadlock situations during recursive locking attempts for
both `read()` and `write()` calls.

  * Provide an example highlighting that multiple read locks can be
    held across different threads simultaneously.
  * Remove the example that shows a situation that can potentially deadlock.
    (as demonstrated in the very same documentation a few paragraphs
    above)
  * Improve documentation regarding the possibility of panics during
    recursive read or write lock attempts.

Issues: Ambiguity in RwLock documentation about multiple read() calls...

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-02-03 07:48:05 -08:00
..
mpmc add experimental oneshot channel 2026-01-05 09:47:15 +11:00
nonpoison mutex.rs: remove needless-maybe-unsized bounds 2026-01-03 11:17:29 +00:00
poison RwLock: refine documentation to emphasize non-reentrancy guarantees 2026-02-03 07:48:05 -08:00
barrier.rs Clarify edge cases for Barrier::new 2025-11-30 17:14:46 +08:00
lazy_lock.rs Replace version placeholders with 1.94 2026-01-20 21:17:10 -05:00
mod.rs add experimental oneshot channel 2026-01-05 09:47:15 +11:00
mpsc.rs add experimental oneshot channel 2026-01-05 09:47:15 +11:00
nonpoison.rs move WaitTimeoutResult up to mod.rs 2025-08-23 09:20:47 -04:00
once.rs Add #[rustc_should_not_be_called_on_const_items] to std methods 2025-11-22 14:48:35 +01:00
once_lock.rs Rollup merge of #149469 - tisonkun:mut-once, r=Mark-Simulacrum 2025-12-28 18:16:10 +01:00
oneshot.rs add experimental oneshot channel 2026-01-05 09:47:15 +11:00
poison.rs move once module out of poison 2025-10-17 11:43:39 -04:00
reentrant_lock.rs Mutex/RwLock/ReentrantLock::data_ptr to be const fn 2025-09-22 12:51:50 -07:00