- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
std::thread_local, std::thread::local, std::thread::local_impl, std::sys_common::thread_local_key, std::sys_common::thread_local_dtor, std::sys::thread_local_key, etc. etc. are all messy and form quite a confusing maze. Just look at this map I tried to draw of it all:
AAAaaaaAaa
Time to clean it up.
And maybe also fix some bugs while we're at it. ^^
- Initial name and module cleanup without touching implementation: Restructure and rename std thread_local internals to make it less of a maze #110861
-  Remove unused Keytype: Remove unused std::sys_common::thread_local_key::Key #110898
- Fix panic-in-drop handling
-  Stop calling everything Key, because most of those things are actually not keys, and dropLazyKeyInner
-  Reduce the amount of code in the thread_local!{}expansion. Make TLS accessors closures that return pointers #125525
-  Use *const Trather than&'static Twhen it's not really'static: Make TLS accessors closures that return pointers #125525
- Clean up implementation more
-  Store thread ID and stack guard range in thread locals without destructors (on platforms with #[thread_local])?- Stack guard range: Refactor stack overflow handling #123265
-  thread ID: Use ThreadId instead of TLS-address in ReentrantLock#124881
 
-  Make thread::currentthread local more efficient and make it available in (most) TLS destructors: std: makethread::currentavailable in allthread_local!destructors #127912
- Detect stack overflow in TLS destructors: std: detect stack overflows in TLS destructors on UNIX #131282
Related issues to solve, maybe:
WaffleLapkin, joboet, jyn514, clubby789, HayleyDeckers and 23 more
Metadata
Metadata
Assignees
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
