4 ms·
Did we implement what Microsoft says these primitives do, or what they actually do ? Well over a month ago, a C++ programmer noticed that, on Windows, the std:
by tialaramex 3y ago
Did we implement what Microsoft says these primitives do, or what they actually do ?
Well over a month ago, a C++ programmer noticed that, on Windows, the std::shared_mutex doesn't work properly, it can just decide to give you an exclusive ("write") lock sometimes when you ask for the non-exclusive ("read") lock. Turns out that the root cause is in Microsoft's Windows SRWLock, an OS primitive provided with exactly the required API, except oops, that's not the API implemented.
The developer explains that sure, that is the documented API but as a "performance optimisation" they decided to implement something else, and after all it wasn't noticed for years so logically this is better, shouldn't maybe the C++ programming language be redefined to mean whatever it is they wanted?
Within Microsoft at least it seems this was accepted, sure, we just don't implement the feature we specified, we'll say that's a "performance optimisation". But because Microsoft are also incompetent at basic ideas like generating documentation although they "accepted" the documentation which re-imagines SRWLock as having been defined differently all along, they still haven't published it a month later...
- skissane 3y ago> Well over a month ago, a C++ programmer noticed that, on Windows, the std::shared_mutex doesn't work properly, https://news.ycombinator.com/item?id=39581664 https://news.ycombinator.com/item?id=39581664 for anyone who didn’t see it at the time (or wants to revisit it)
- deleted 3y ago[deleted]