reSIProcate has a class QpidProtonThread[1] for sending to a topic.
The class runs the container in a thread, the method QpidProtonThread::thread() is the code executed in the thread when it starts. Another thread is calling the sendMessage(..) method. That method uses event_loop()->inject(...) to have the doSend(...) method called safely. This appears to work for a while. I notice that when the event loop calls my void_function0 class operator(), which calls doSend(...), it is not calling it in the container thread, it is being called in the thread that invoked sendMessage(...). Is that expected behaviour? Eventually, the on_sendable() method is called. I see it is being called in the container's thread. That method also calls doSend(...). At this point, the other thread becomes stuck. I was thinking about simply removing the on_sendable() method. However, given that I am using the inject method, should I not be having a problem like this at all? Regards, Daniel 1. https://github.com/resiprocate/resiprocate/blob/master/repro/QpidProtonThread.cxx --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
