Files
rust/library/std/tests
Jonathan Brouwer 08343b5707 Rollup merge of #153555 - asder8215:rwlock_docs, r=Mark-Simulacrum
Clarified docs in std::sync::RwLock + added test to ensure that max reader count is respected

This addresses the issue with the [`std::sync::RwLock` docs](https://doc.rust-lang.org/std/sync/struct.RwLock.html) in rust-lang/rust#115338. It centers around the following lines:

> An `RwLock` will allow any number of readers to acquire the lock as long as a writer is not holding the lock.

It's true that the `RwLock` in theory should allow any number of readers to acquire the lock when a writer is not holding it, but this may not be true in the implementation and could be os dependent. I decided to replace "any number of readers" to "multiple", so that it implies that more than 1 reader can acquire the lock, but you can't necessarily take away that this value is unbounded.

@rustbot label +A-docs
2026-04-04 17:19:09 +02:00
..
2025-02-07 16:54:07 +01:00
2024-04-28 18:04:25 -04:00
2026-02-22 19:59:25 +01:00
2026-02-26 23:11:40 +05:30
2024-04-28 18:04:25 -04:00
2025-02-09 17:11:13 +00:00
2024-07-29 08:26:52 +10:00