Edition 2027: Consider replacing `std::sync::Mutex` and other locks with `std::sync::nonpoison` versions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This serves as a place to discuss changing default lock types to their nonpoison versions, which has come up a number of times before but not yet (to my knowledge) discussed in depth.
@davepacheco brings up a good point at https://github.com/rust-lang/rust/issues/134645#issuecomment-3583159102 that having posioning locks tends to be a safer default, and that the .unwrap() annoyance could be smoothed with panicking methods rather than changing out the type.
I'm not sure whether or not an RFC would be required but considering the impact, it doesn't seem like a bad idea (see also https://github.com/rust-lang/rfcs/pull/3550 for a similar change, though that involved lang).
Related:
- Tracking issue for adding the types: https://github.com/rust-lang/rust/issues/134645
- Tracking issue for the modules: https://github.com/rust-lang/rust/issues/134646
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the related tracking issues 134645 and 134646, then review the discussion linked from issue 134645 and RFC pull request 3550 for prior context. The payload names no implementation files or tests; the work is done only after the project reaches and documents a decision on whether to pursue the lock-type change and whether an RFC is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100