views:

114

answers:

1

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 are different between Release and Debug mode, and that would make the queue stop working.

A: 

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.

jules