-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for once_cell #74465
Copy link
Copy link
Closed
Labels
A-concurrencyArea: ConcurrencyArea: ConcurrencyB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-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.
Metadata
Metadata
Assignees
Labels
A-concurrencyArea: ConcurrencyArea: ConcurrencyB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a tracking issue for the RFC "standard lazy types" (rust-lang/rfcs#2788).
The feature gate for the issue is
#![feature(once_cell)].Unstable API
Steps
once_cell#105587 (comment)once_cell#105587Unresolved Questions
Inlined from #72414:
Syncprefix likeSyncLazyfor now, but have a personal preference forAtomiclikeAtomicLazy. Resolved in: Tracking Issue foronce_cell#74465 (comment). Surprisingly, after more than a year of deliberation we actually found a better name.std::synctypes that we might want to just avoid upfront forstd::lazy, especially if that would align with a futurestd::mutexthat doesn't poison. Personally, if we're adding these types tostd::lazyinstead ofstd::sync, I'd be on-board with not worrying about poisoning instd::lazy, and potentially deprecatingstd::sync::Onceandlazy_staticin favour ofstd::lazydown the track if it's possible, rather than attempting to replicate their behavior. cc @Amanieu @sfackler.SyncOnceCell::getblocking. There doesn't seem to be consensus in the linked PR on whether or not that's strictly better than the non-blocking variant. (resolved in Tracking Issue foronce_cell#74465 (comment)).Release/Acquire, but it could also use the elusive Consume ordering. Should we spec that we guaranteeRelease/Acquire? (resolved as yes: consume ordering is not defined enough to merit inclusion into std)SyncOnceCellin no_std. I think there's consensus that we don't want to include "blocking" parts of API, but it's unclear if non-blocking subset (get+set) would be useful. (resolved in Tracking Issue foronce_cell#74465 (comment)).get_or[_try]_initthe best name? (resolved as yes in Update once_cell 'get_or_init' to 'get_or_init_with' #107184)Implementation history
UnwindSafebounds