3 ms·
Why didn't you use a Mutex?
by _nalply 3y ago
Why didn't you use a Mutex?
- kevincox 3y agoWhat are you thinking? I could have used a Mutex then cast the `&Mutex` to `&mut Mutex` so that I could call `.get_mut()`. But this didn't seem simpler.
- _nalply 3y agoI wanted to avoid unsafe. Because unsafe introduces conceptual complications and it seemed to be simpler to avoid that in an example.