-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Move std::thread_local::*
into std::thread
#909
Conversation
+1 to Though this is a breaking change, it is also a small one, and if I am reading #911 correctly, then there may be breaking changes to |
Good idea. |
Both |
On All that said: the current name suffers from some of my nit-picking as well, so it isn't really an excuse not to change what we have now to one of the proposed items. |
This is a great idea! The fact that A submodule called |
@jmesmon When people talk about "thread locals" (note here local is used like a noun), I tend to assume that they are referring to "thread local storage/variables", though technically there are other things that are local to threads. So I am fine with Also, I believe we can "repurpose" the module a bit, and actually put other thread local entities inside |
Since there's very little in |
@aturon, |
@carllerche Can you update the RFC with the |
This RFC, which is a minor organizational tweak, has been approved. The final decision was to use |
This commit implements [RFC 909](rust-lang/rfcs#909): The `std::thread_local` module is now deprecated, and its contents are available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and `ScopedKey`. The macros remain exactly as they were, which means little if any code should break. Nevertheless, this is technically a: [breaking-change] Closes rust-lang#23547
This commit implements [RFC 909](rust-lang/rfcs#909): The `std::thread_local` module is now deprecated, and its contents are available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and `ScopedKey`. The macros remain exactly as they were, which means little if any code should break. Nevertheless, this is technically a: [breaking-change] Closes rust-lang#23547
Propose moving the contents of
std::thread_local::*
intostd::thread
Rendered