-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for const-initialized thread locals #84223
Copy link
Copy link
Closed
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)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-langRelevant to the language teamRelevant to the language teamT-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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Metadata
Metadata
Assignees
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)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-langRelevant to the language teamRelevant to the language teamT-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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(thread_local_const_init)]This is a tracking issue for the
const-initialization of thread locals in the standard library added in #83416.Public API
The API here is intended to be exclusively within the syntax of the preexisting
thread_local!macro. The initialization expression for thread local keys can now be surrounded withconst { ... }to indicate that the value should be const-evaluated and initialized.Note that this also supports the multi-definition form:
Steps / History
Unresolved Questions
constblocks, ok here? Are there other options for syntax?