3 ms·
Yes, for example if you make a Rust std::sync:RWLock on Windows, it will literally be SRWLock because Microsoft advertises this API as having exactly the behavi
by tialaramex 3y ago
Yes, for example if you make a Rust std::sync:RWLock on Windows, it will literally be SRWLock because Microsoft advertises this API as having exactly the behaviour Rust wants so why would you build something worse instead ?
Rust's Mutex on Windows is also an SRWLock but it can't hit this bug because it deliberately only uses the exclusive locking.
- iknowstuff 3y agoSo it doesn't use a shared lock when .read() is used?
- zozbot234 3y agoRust has both Mutex and RWLock. The Mutex only uses exclusive locks, there's no distinction between "read" and "write".
- iknowstuff 3y agoOh sorry my morning brain thought the comment was all about RWLock