On 18. 01. 14 04:10, serega wrote:
Thanks for the answer. Yes, I do have thread safe queue, so I might just
follow your suggestion and set up a reverse queue for trackers.

If you care about latency this may not be enough because the thread owning the
messenger will only be able to observe the queue when it comes out of the
(most probably) pn_messenger_recv() which will happen after the next message
is received (and if this depends on previous message being accepted, it's deadlock not latency :).

The way out is to drive messenger in async mode and when you enqueue the tracker you call pn_messenger_interrupt(), which is safe to call from another thread context.

Bozzo

Reply via email to