开发者

boost::interprocess::message_queue stops working in Release mode with visual C++

I am using boost::interprocess::message_queue, with VC++ (in Microsoft Visual Studio 2005). It is working properly in Debug mode. Then when I compile my program in Release mode it stops working, every time I call "try_send" it returns false. I don't understand what could be the settings that ar开发者_开发技巧e different between Release and Debug mode, and that would make the queue stop working.


It turns out that my Release version does not do as much logging as the debug one. The thread that accumulates the messages in the queue is quicker, which means that the other thread (which flushes the messages) does not catch up. In the end the message queue if full. I need to use timed_send to make so that the other thread gets time to catch up.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜