Do mutexes guarantee ordering of acquisition? Unlocking thread takes it again while others are still waiting
Known problem. C++ mutexes are thin layer on top of OS-provided mutexes, and OS-provided mutexes are often not fair. They do not care for FIFO. The other side of the same coin is that threads are usually not pre-empted until they run out of their time slice. As a result, thread A in this scenario … Read more