Hi Folks,
See attached code: I'm encountering a deadlock when I try to stop messengers.
The general workflow is:
1. Create pub and sub Messengers
2. Start the Messengers
3. Thread sub off onto its own thread as recv is a blocking call
4. Publish round trip from the pub messenger to the sub messe
I would suggest that you not stop the subscriber messenger in the main
thread. Rather, stop it in the subscriber thread right before it
exits. Alternatively (preferably), you should pthread_join the thread
in main before stopping the messengers.
It looks to me that you've got a race conditio
Thanks Ted,
I did try inserting a sleep of 1s between the send and the stop (I suspected
the same thing you did), but the behaviour persisted so I don't think the
problem was the time for the message to land.
However, your suggestion to stop it in the subscriber thread did seem to work
(still
Hello everybody,
I've been following this list for quite a while but so far had no reason
to take part in discussions.
However, these days I'm porting some C++ code that is using Proton-C to
talk to peers to Java. The C++ code uses pn_data_put_* functions from
codec module to compose the body of
Hi Leon,
As you have noticed a pure Java implementation of the Data interface is not
yet available (I think I have a 30% complete implementation sitting
somewhere on an old laptop, but I never got round to finishing it). It
will get implemented eventually, but it's not currently being worked on a
Hi Rob,
thanks for reply. It got me thinking ... since Data interface is not a
history and will be around, to do things The Right Way I'll have to
implement parts of it myself anyway. So I might as well take a shot in
adding missing 70%, or at least some part of them, on top of your 30%
:-).
That would be great!
Let me have a dig around over the weekend and see if I can find it (I have
*lots* of machines where it might be on :-( I should probably be more
organised).
Cheers,
Rob
On 14 June 2013 16:01, Leon Mlakar wrote:
>
> Hi Rob,
>
> thanks for reply. It got me thinking ... sin
What I'm doing with Messenger Tutorial Docs -- Reviews Welcome
==
{
1. How it works
--
{
There will be a custom cmake target, probably called 'docs'.
When you 'make' this target, i
Hmm - perhaps I spoke too soon...
This looked like it worked in that little test application but when I plugged
it into my actual application, it seemed to work some of the times and not
others. I then took your advice and introduced a join in the test application
and as soon as I do so, stoppi