Skip to content

Edition 2027: Consider replacing std::sync::Mutex and other locks with std::sync::nonpoison versions #149359

@tgross35

Description

@tgross35

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 #134645 (comment) 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 rust-lang/rfcs#3550 for a similar change, though that involved lang).

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-maybe-future-editionSomething we may consider for a future edition.C-discussionCategory: Discussion or questions that doesn't represent real issues.I-libs-api-nominatedNominated for discussion during a libs-api team meeting.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions