-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for thread_local stabilization #29594
Copy link
Copy link
Open
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)B-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 RFCF-thread_local`#![feature(thread_local)]``#![feature(thread_local)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)B-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 RFCF-thread_local`#![feature(thread_local)]``#![feature(thread_local)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
The
#[thread_local]attribute is currently feature-gated. This issue tracks its stabilization.Known problems:
#[thread_local]translates directly to thethread_localattribute in LLVM. This isn't supported on all platforms, and it's not even supported on all distributions within the same platform (e.g. macOS 10.6 didn't support it but 10.7 does). I don't think this is necessarily a blocker, but I also don't think we have many attributes and such which are so platform specific like this.Sync- #[thread_local] statics shouldn't require Sync #18001'staticlifetime or should be unsafe to access - Safe access to a#[thread_local]should be disallowed #17954'staticlifetime with NLL (#[thread_local] static mutis allowed to have'staticlifetime #54366)