[zeromq-dev] Issue 85 & 92
ntupel at googlemail.com
ntupel at googlemail.com
Tue Oct 26 18:30:12 CEST 2010
On Tue, Oct 26, 2010 at 5:27 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> On 10/26/2010 05:08 PM, ntupel at googlemail.com wrote:
>
>> My question is - how am I supposed to cleanly shutdown my application,
>> given that I can't invoke zmq_close on S from T2 and T1 is stuck in a
>> blocking call?
>
> Irrespective to use of multicast, the termination sequence goes like this:
>
> 1. Thread A closes all its sockets and invokes zmq_term.
Assuming A == T1, then it can not close its socket, because it is
stuck in zmq_recv. The decision to terminate is coming from T2. How
should T1 know that it should close its socket? And when T2 calls
zmq_term, T1 is already blocked in zmq_recv, so it doesn't get ETERM.
To me it looks like it is actually impossible to cleanly terminate my
application.
-nt
More information about the zeromq-dev
mailing list