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.
精彩评论