[zeromq-dev] Questions about Shutdown

Pieter Hintjens ph at imatix.com
Sun Jun 22 12:17:23 CEST 2014

On Sat, Jun 21, 2014 at 6:19 PM, Paulmichael Blasucci
<pblasucci at gmail.com> wrote:

> So, after 3 years of putting ZMQ in production, I'm worried I may be
> operating under mistaken assumptions. In the guide (and in my code), there
> is a fairly consistent pattern:

Indeed, and this is the only safe way to do it. libzmq doesn't shut
down properly if there are operations pending (connects or sends), and
the cleanest way to cancel all these is to set linger to 0 on all
sockets, then close them, before shutting down the context. It's quite
clean semantically too. Some bindings like CZMQ hide this and do it
automatically for applications.


More information about the zeromq-dev mailing list