The go-to synchronization primitive on Windows, critical sections[1], does a short spin in then waits.
To me it has always seemed as a decent strategy, and when working on a cross-platform heavily multi-threaded code base which had a fairly contested hot-spot, Windows performed quite well using just plain critical sections.
To me it has always seemed as a decent strategy, and when working on a cross-platform heavily multi-threaded code base which had a fairly contested hot-spot, Windows performed quite well using just plain critical sections.
[1]: https://learn.microsoft.com/en-us/windows/win32/sync/critica...