[zeromq-dev] Pattern for clean shutdown of a proxy loop

Pieter Hintjens ph at imatix.com
Tue Mar 11 22:02:26 CET 2014

You can look at the CZMQ zproxy class to see one way to do this.

On Tue, Mar 11, 2014 at 9:35 PM, Cosmo Harrigan
<cosmo.harrigan at singularityu.org> wrote:
> Hi,
> What is the best practice when you are creating a loop that functions like
> the zmq_proxy device, to bind a PULL socket that is fed by a backend
> ventilator with a frontend PUB socket, in order to properly handle a clean
> shutdown?
> Most of the examples on the zguide just show "while (1)" with a loop that
> never terminates. What's the suggested way of signaling to the loop which is
> running in its own thread that it is time to shut down?
> Thanks,
> Cosmo
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list