ACE_Remote_Mutex 如何工作?
我编写了两个小程序,试图获取名为“令牌”的相同远程互斥锁:
ACE_Remote_Mutex token("The Token", 1, 1);
token.acquire();
ACE_OS::sleep(5);
token.release();
return 0;
它们都得到以下调试输出:
(3078597488) acquired The Token (4243|3078597488) BIG PROBLEMS with get_connection: Connection refused error on remote acquire, releasing shadow mutex. (3078597488) released The Token, owner is no owner (4243|3078597488) BIG PROBLEMS with get_connection: Connection refused (3078597488) release failed: Permission denied. (3078597488) shadow: release failed
ACE_Remote_Mutex 是否仅与某种“代理”(如 Corba 代理)一起工作?我可以修改我的代码吗?
I wrote two small programs which tried to acquire the same Remote Mutex named "The Token":
ACE_Remote_Mutex token("The Token", 1, 1);
token.acquire();
ACE_OS::sleep(5);
token.release();
return 0;
Both of them got the following debug output:
(3078597488) acquired The Token (4243|3078597488) BIG PROBLEMS with get_connection: Connection refused error on remote acquire, releasing shadow mutex. (3078597488) released The Token, owner is no owner (4243|3078597488) BIG PROBLEMS with get_connection: Connection refused (3078597488) release failed: Permission denied. (3078597488) shadow: release failed
Does ACE_Remote_Mutex work only with some sort of "agent" like Corba broker? Can I modify my code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Remote_Mutex 使用令牌服务来获取锁。 Token Service 不是 CORBA 服务,但起着类似的作用。以下是动态启动令牌服务的 svc.conf 条目示例:
Remote_Mutex uses Token Service to acquire lock. Token Service is not a CORBA service but it plays a role similar to it. Here is an example of svc.conf entry that starts Token Service dynamically: