[zeromq-dev] zmq_term
Matt Weinstein
matt_weinstein at yahoo.com
Mon Oct 31 03:34:02 CET 2011
Folks,
I've finally been tasked with moving to ØMQ 2.1.X from 2.0.X.
My biggest problem is the new context semantics.
I have always used zmq_term to terminate a context. If I had wanted to wait, I would have built a list of sockets.
lingering on a close is fine, I can control whether that occurs or not. However, I consider zmq_term waiting for sockets to be closed "mal-lingering".
In order to fix the problem, you're required to keep a duplicate list of sockets for each context.
Meanwhile, I saw the czmq recommendation. I'm presuming it's a façade which adds said bookkeeping layer. This adds complexity in multiple ways, and misses the mark IMHO. I'd be happy to discuss.
To fix the zmq_term problem, I would propose either:
add zmq_setctxopt() / zmq_getctxopt() with an option to select termination behavior; or
create an info call (zmq_getctxinfo()) to obtain socket lists from contexts.
Comments etc. are welcome.
Thanks,
Best,
Matt
On Sep 17, 2011, at 1:53 AM, Andrew Hume wrote:
> fair enough.
> (although i already have my own equivalent more or less.)
>
> in any case, problem solved through the sophisticated technique
> of adding printfs to zmq.cpp for zmq_socket and zmq_close.
>
> andrew
>
> On Sep 16, 2011, at 10:42 PM, Pieter Hintjens wrote:
>
>> I'd suggest using czmq and its automatic socket shutdown ...
>>
>> -Pieter
>>
>> On Sep 16, 2011 11:47 PM, "Andrew Hume" <andrew at research.att.com> wrote:
>> > god help me, this is frustrating!
>> > is there any way for wretched zmq_term to tell what wretched socket it is waiting on?
>> >
>> > ------------------
>> > Andrew Hume (best -> Telework) +1 623-551-2845
>> > andrew at research.att.com (Work) +1 973-236-2014
>> > AT&T Labs - Research; member of USENIX and LOPSA
>> >
>> >
>> >
>> >
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ------------------
> Andrew Hume (best -> Telework) +1 623-551-2845
> andrew at research.att.com (Work) +1 973-236-2014
> AT&T Labs - Research; member of USENIX and LOPSA
>
>
>
>
> _______________________________________________
> 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/20111030/7ce03b82/attachment.htm>
More information about the zeromq-dev
mailing list