开发者

How to share datas between Ruby and c?

There is a Ruby process and has a string var name开发者_StackOverflowd "switch", and the "switch" will be updated by user. There are also 2 C daemon process, which need to access the "switch" in a loop and decide the logic in runtime, how to deal with this case ? thanks!


A socket (or a common file) can be used as a pipe between them.


Given your description, it sounds like you need a message queue. Something like RabbitMQ should work. See http://www.rabbitmq.com/getstarted.html for details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜