Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add language-level support for thread-local data #10310

Closed
thestinger opened this issue Nov 6, 2013 · 0 comments · Fixed by #10312
Closed

add language-level support for thread-local data #10310

thestinger opened this issue Nov 6, 2013 · 0 comments · Fixed by #10312
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@thestinger
Copy link
Contributor

LLVM has a thread_local specifier, for fast thread-local data. This could be exposed with a #[thread_local] attribute.

It will still be necessary for #[thread_local] static mut to be unsafe, because a borrow would have a 'static lifetime and freezing wouldn't really be possible...

bors added a commit that referenced this issue Nov 26, 2013
This provides a building block for fast thread-local storage. It does
not change the safety semantics of `static mut`.

Closes #10310
Jarcho pushed a commit to Jarcho/rust that referenced this issue Feb 26, 2023
[arithmetic_side_effects] Fix rust-lang#10209

Fix rust-lang#10209

---

changelog: Enhancement: [`arithmetic_side_effects`]: No longer lints, if safe constant values are used.
[rust-lang#10310](rust-lang/rust-clippy#10310)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant