[英]Why do the boost interprocess named mutex docs say each process should have it's own named mutex?
I'm trying to use boost interprocess named mutex, and I'm a little confused about this line from the documentation : A mutex with a global name, so it can be found from different processes. 我正在尝试使用名为互斥的boost进程间,而对于文档中的这一行我有些困惑: 具有全局名称的互斥体,因此可以在不同的进程中找到它。 This mutex can't be placed in shared memory, and each process should have it's own named_mutex.
该互斥锁不能放在共享内存中,每个进程都应具有自己的named_mutex。
I want different processes to use the same mutex, not each to have their own. 我希望不同的进程使用相同的互斥锁,而不是每个进程都有自己的互斥锁。 What does that line mean exactly?
那条线到底是什么意思?
http://www.boost.org/doc/libs/1_63_0/doc/html/boost/interprocess/named_mutex.html http://www.boost.org/doc/libs/1_63_0/doc/html/boost/interprocess/named_mutex.html
That seems to be badly worded. 看来措辞不好。 It should read something like:
它应显示为:
... and each process should have it's own
named_mutex
class instance....,每个进程都应该有自己的
named_mutex
类实例。
Also have a look at named_mutex
example usage here . 也可以在此处查看
named_mutex
示例用法。 You will need to scroll down to "named mutex example". 您将需要向下滚动到“命名互斥锁示例”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.