为什么 boost interprocess named mutex docs 说每个进程都应该有自己的命名互斥体?

Why do the boost interprocess named mutex docs say each process should have it's own named mutex?

我正在尝试使用名为 mutex 的 boost 进程间,我对文档中的这一行感到有点困惑: 具有全局名称的互斥锁,因此可以从不同的进程中找到它。这个互斥量不能放在共享内存中,每个进程都应该有自己的 named_mutex.

我希望不同的进程使用相同的互斥锁,而不是每个进程都有自己的互斥锁。那一行到底是什么意思?

http://www.boost.org/doc/libs/1_63_0/doc/html/boost/interprocess/named_mutex.html

好像措辞不当。它应该是这样的:

... and each process should have it's own named_mutex class instance.

另请参阅 named_mutex 示例用法 here。您需要向下滚动到 "named mutex example".