Revisit lock-free ThreadLocalStorage storage management
Open
@jonwis is already working on this.
Since Jan 4, 2026.
- Dominant language
- C++
- Stars
- 3k
- Forks
- 300
- Avg merge
- 19h 12m
- Merged PRs (30d)
- 1
Description
https://github.com/microsoft/wil/blob/master/include/wil/result.h#L403-L430
Internal analysis suggests that this sequence is not entirely thread safe. Some options include:
- Use an srwlock-per-bucket (costs a function call)
- Figure out the right sequence of acquire/release semantics for reading the hashtable bucket entries' starting pointer
- Spin gently (using the platform's "yield" instructions as necessary)
- Deeper analysis to prove safety with annotations and documentation
Thanks to @sudhakar-vp-zz and @cpkleynhans for the analysis! (See OS PR#13582094)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.