[zeromq-dev] Are bindings supposed to set linger on implicit close/destroy?

MinRK benjaminrk at gmail.com
Thu Mar 19 02:27:28 CET 2015


(pyzmq maintainer here)

I disagree with the sentiment expressed in the Guide. Either it belongs as
the libzmq default behavior itself, or it doesn't. It doesn't make sense to
me for language bindings to unanimously disagree with libzmq instead of
changing the underlying libzmq behavior.

-MinRK

On Wed, Mar 18, 2015 at 9:17 PM, Dylan Cali <calid1984 at gmail.com> wrote:

> Hello,
>
> The zguide states at the end of "Making a Clean Exit":
>
> you need to shut down each socket that has ongoing requests. The proper
>> way is to set a low LINGER value (1 second), and then close the socket. *If
>> your language binding doesn't do this for you automatically when you
>> destroy a context, I'd suggest sending a patch. *
>>
>> ...
>>
>> Voila! It's complex and painful enough that *any language binding author
>> worth his or her salt will do this automatically and make the socket
>> closing dance unnecessary.*
>>
>
> Yet I noticed the pyzmq bindings do not seem to follow this convention and
> scripts that do not explicitly set linger themselves hang.  The pyzmq devs
> closed this as a non-issue:
>
> https://github.com/zeromq/pyzmq/issues/102
>
> Conversely, both the czmq and jzmq bindings do set a low linger:
>
> https://github.com/zeromq/czmq/issues/116
> http://git.io/hBaf
>
> So should this be considered a bug in pyzmq, and as a bindings author
> should I follow the convention of setting a low linger?
>
> Thanks much,
> Dylan
>
>
>
> _______________________________________________
> 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/20150318/507b94dd/attachment.htm>


More information about the zeromq-dev mailing list