The standard library implementation can freely use any mutex implementation that they like, which meets the requirements and behavior set forth in the standard. An implementation that provides an interworking process lock that is not required by the standard is more likely to be less effective than one that does not. Thus, a high-quality implementation is likely to provide local process mutexes (mutices?).
Thus, although it would be possible to implement a consistent implementation of C ++ 11 mutexes using, for example, the named semaphores, it would be difficult to sell this implementation to users. As far as I know, there is no popular implementation that provides cross-process locking in std::mutex.
Casey source
share