News for hackers. Stuff that matters.
Re:You can't Rust that by dbaupp on Saturday March 31, 2018 @05:28PM (#16725261)
How is safely accessing a mutable global from multiple threads an easy thing?

Also, the Arc isn't needed in lazy_static: just a mutex is enough for mutability, the sharing (which is what Arc controls) comes from being a static.

Re:You can't Rust that by comex on Saturday March 31, 2018 @08:19PM (#16725935)
And if there's just a single u32 inside, there's no need for a whole mutex, you can just use a zero-overhead AtomicU32. …or you could, if it were stable.
Re:You can't Rust that by retrocat on Sunday April 01, 2018 @01:53AM (#16726959)
AtomicUsize is stable!