Files
rust/library/std
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
..
2026-03-14 17:54:19 +05:30
2026-03-28 13:14:53 +01:00