The Rust Programming Language Forum
Why thread_local! statics can only be accessed inside `with`
help
hystericfleece
August 27, 2024, 4:24pm
4
But this does not compile:
Just thinking about on what should I write to break this example.
show post in topic
Related topics
Topic
Replies
Views
Activity
What prevents refs to thread locals being passed to other threads?
help
14
452
July 5, 2024
Why do methods on thread::LocalKey take &'static self?
5
146
November 13, 2024
Why does LocalKey need a callback interface?
help
7
830
August 4, 2022
Is it correct to rely on thread_local! behavior of defining a const value instead of static?
help
3
233
July 8, 2024
How to return a reference to `thread_local!` value?
9
1468
April 20, 2023