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

Dylan Cali calid1984 at gmail.com
Thu Mar 19 02:17:28 CET 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150318/205f1d5f/attachment.htm>


More information about the zeromq-dev mailing list