3 ms·
But `Mutex::get_mut` takes `&mut Mutex`. In this case the exclusivity and safety is ensured by the exclusive reference `&mut`. So get_mut can be called from any
by pornel 5y ago
But `Mutex::get_mut` takes `&mut Mutex`. In this case the exclusivity and safety is ensured by the exclusive reference `&mut`. So get_mut can be called from any thread where you can get hold of a `&mut Mutex`.
- masklinn 5y agoYes? I didn’t say it was unsafe.