[zeromq-dev] Issue 85 & 92
Nir Soffer
nirsof at gmail.com
Sun Oct 3 01:17:02 CEST 2010
Ok, here is a proposal:
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.
3. A terminated socket will return ETERM for any call. This means that
all the resources can be released.
4. The socket will not be deallocated - the user is responsible
for deallocating the socket (you created it, you deallocate it).
I started to explore this direction, by using socket_base_t::process_stop,
since ctx_t:terminate already send a stop command. However,
socket_base_t::process_stop is never invoked after sending a stop command.
I verified this by adding zmq_assert (false) in socket_base_t::process_stop,
and it does not abort as expected.
I tried to connect the socket before calling zmq_term, and added little
sleep to make sure that the io thread is running and the socket is
connected. I also tried PUB socket bound to ipc address.
Is this a bug or I'm missing something?
On Sat, Oct 2, 2010 at 4:08 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Guys,
>
> >> Your call, Martin. I'm pretty sure the new behavior of zmq_term will
> >> trip up a lot of people.
> >
> > It did me. When the basic hello world example failed I assumed
> > 2.1.0 wasn't ready to even look at and went back to 2.0.9.
>
> As I said: If you have a better idea, please, do propose it.
>
> Complaining about behaviour without proposing a better solution isn't
> going to help.
>
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101003/f0fdccd3/attachment.htm>
More information about the zeromq-dev
mailing list