4 ms·
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,
by dbaupp 9y ago
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.