[zeromq-dev] Issue 85 & 92
Pieter Hintjens
ph at imatix.com
Sun Oct 3 09:25:29 CEST 2010
On Sun, Oct 3, 2010 at 7:09 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Nir,
>
>> 1. When context is terminated, it will ask sockets to terminate when
>> they are done.
>> 2. A socket is done when it does not have pending outgoing messages.
>
> Are you proposing that zmq_close blocks until all messages are sent?
>
>> 3. A terminated socket will return ETERM for any call. This means
>> that all the resources can be released.
+1
>> 4. The socket will not be deallocated - the user is responsible
>> for deallocating the socket (you created it, you deallocate it).
+1
Martin, here's my proposal for accurate behavior of zmq_term:
1. flag any remaining open sockets as 'closed' without deallocating
them but so that further work on those sockets can properly ETERM<
2. flush any pending messages, with reasonable semantics depending on
the socket type and connection status
3. return after that work is done
4. absolutely not block indefinitely when there is no work to do
Sorry I can't provide a patch for this, but my role is limited to
helping you define sensible behavior of the API.
-Pieter
More information about the zeromq-dev
mailing list