-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(generic_atomic)]
This is a tracking issue for replacing the distinct Atomic* types with a generic Atomic<T> type. This allows using Atomic with FFI type aliases and helps clean up some API surface. Only types with existing AtomicT are usable in Atomic<T>.
Public API
// core::sync::atomic
pub struct Atomic<T: AtomicPrimitive>(/* private fields*/);
pub type AtomicI32 = Atomic<i32>; // etcSteps / History
- ACP: ACP: Generic
Atomic<T>libs-team#443 - Implement
Atomic<T>as an alias toAtomicT: CreateAtomic<T>type alias (rebase) #136316 - Flip alias so
AtomicTis an alias toAtomic<T> - Move generic functionality from
AtomicTtoAtomic<_> - Pseudo-prerequisite: Stabilize 128-bit atomics: Tracking issue for integer_atomics (
AtomicU128/AtomicI128) #99069 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
Atomic<T>is soft-blocked on 128-bit atomics, because since trait implementations cannot be unstable, gatingAtomic<i128>separately fromAtomic<i32>isn't possible.- If necessary,
AtomicI128could instead nameAtomic<Wrapper<i128>>for some unstable nameWrapperuntil 128-bit atomics are stable, to preventAtomic<i128>from being usable from stable earlier than intended.
- If necessary,
Footnotes
MolotovCherry and jasper310899MolotovCherry and jasper310899bjoernager, Serial-ATA, MolotovCherry, joseluis and jasper310899
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.