Tracking Issue for `sync_poison_mod`
Open
@GrigorenkoPV is already working on this.
Since Dec 23, 2024.
C-tracking-issue
E-easy
E-help-wanted
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(sync_poison_mod)]
This is a tracking issue moving all poisonable std::sync types to std::sync::poison, with reexports in std::sync. In a future edition, we will be able to instead reexport std::sync::nonpoison (this module does not exist yet).
Public API
// std::sync::poison
type LockResult;
type TryLockResult;
struct Condvar { /* ... */ };
struct Mutex<T: ?Sized> { /* ... */ };
struct MutexGuard { /* ... */ };
struct Once { /* ... */ };
struct OnceState { /* ... */ };
struct PoisonError { /* ... */ };
struct RwLock { /* ... */ };
struct RwLockReadGuard { /* ... */ };
struct RwLockWriteGuard { /* ... */ };
enum TryLockError { /* ... */ };
// Unstable types
pub struct MappedMutexGuard<'a, T: ?Sized + 'a> { /* ... */ }
pub struct MappedRwLockReadGuard<'a, T: ?Sized + 'a> { /* ... */ }
pub struct MappedRwLockWriteGuard<'a, T: ?Sized + 'a> { /* ... */ }
// std::sync
// This module will be gated behind `sync_poison`
pub mod poison;
pub use poision::*;
Steps / History
- ACP: https://github.com/rust-lang/libs-team/issues/169#issuecomment-2558025680
- Implementation: https://github.com/rust-lang/rust/pull/134692
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- None yet.
Related
-
nonpoisonversions of existingpoisontypes: https://github.com/rust-lang/rust/issues/134645 - Should
LazyLockbe moved? https://github.com/rust-lang/rust/issues/134646#issuecomment-3151272105 - Discussion about changing the defaults https://github.com/rust-lang/rust/issues/149359
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.
Assessment
This issue has not been assessed yet.