about summary refs log tree commit diff
path: root/library/std/src/sync/poison/mutex.rs
AgeCommit message (Collapse)AuthorLines
2025-09-22Mutex/RwLock/ReentrantLock::data_ptr to be const fnPeter Lyons Kehl-1/+1
2025-08-23fix visibility of private gettersConnor Tsui-2/+4
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-08-16run spellcheck as a tidy extra check in cibinarycat-1/+1
2025-08-02Rollup merge of #144185 - purplesyringa:poisoning-wording, r=AmanieuSamuel Tardieu-9/+61
Document guarantees of poisoning This mostly documents the current behavior of `Mutex` and `RwLock` (rust-lang/rust#143471) as imperfect. It's unlikely that the situation improves significantly in the future, and even if it does, the rules will probably be more complicated than "poisoning is completely reliable", so this is a conservative guarantee. We also explicitly specify that `OnceLock` never poisons, even though it has an API similar to mutexes. Fixes rust-lang/rust#143471 by improving documentation. r? ``@Amanieu``
2025-07-29clean up existing poison filesConnor Tsui-1/+1
2025-07-25Add a note on foreign exceptionsAlisa Sireneva-0/+3
2025-07-25Add a list of failure conditions for poisoningAlisa Sireneva-4/+19
2025-07-19Document guarantees of poisoningAlisa Sireneva-9/+43
This mostly documents the current behavior of `Mutex` and `RwLock` as imperfect. It's unlikely that the situation improves significantly in the future, and even if it does, the rules will probably be more complicated than "poisoning is completely reliable", so this is a conservative guarantee. We also explicitly specify that `OnceLock` never poisons, even though it has an API similar to mutexes.
2025-05-21Add more docs to new data_ptr methodsJonas Platte-0/+5
2025-05-21Add data_ptr method to Mutex and RwLockJonas Platte-0/+6
2025-04-30Rename `(Mapped)(RwLock|Mutex)Guard::try_map` to `filter_map`.Zachary S-12/+10
1. analogous to std::cell::Ref(Mut)::filter_map. 2. doesn't imply `Try` genericizability.
2025-03-31std: clarify Mutex::get_mut more clearlyxizheyin-1/+5
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-02-04Rollup merge of #135621 - bjorn3:move_tests_to_stdtests, r=NoratriebJacob Pratt-3/+0
Move some std tests to integration tests Unit tests directly inside of standard library crates require a very fragile way of building that is hard to reproduce outside of bootstrap. Follow up to https://github.com/rust-lang/rust/pull/133859
2025-02-01docs: Documented Send and Sync requirements for Mutex + MutexGuardRoss Sullivan-2/+30
2025-01-26Move std::sync unit tests to integration testsbjorn3-3/+0
This removes two minor OnceLock tests which test private methods. The rest of the tests should be more than enough to catch mistakes in those private methods. Also makes ReentrantLock::try_lock public. And finally it makes the mpmc tests actually run.
2025-01-06chore: remove redundant words in commentcrystalstall-1/+1
Signed-off-by: crystalstall <crystalruby@qq.com>
2025-01-02Move some things to `std::sync::poison` and reexport them in `std::sync`Pavel Grigorenko-0/+849