3 ms·
Totally. I take a slightly different view in the statics thing; like a static means you want something to be available across threads. So by using a static, yo
by steveklabnik 4y ago
Totally.
I take a slightly different view in the statics thing; like a static means you want something to be available across threads. So by using a static, you’re opening yourself to that possibility. If you want something global to a thread, use thread local storage, and Rust will allow you to use stuff that’s not okay if multiple threads were involved. It’s about expressing your intent correctly.
- brundolf 4y agoTIL thread local storage!