[zeromq-dev] How to gracefully terminate ZMQ

Martin Sustrik sustrik at 250bpm.com
Mon Feb 28 09:18:49 CET 2011


Hi Christian.

> Before ZMQ 2.1 it was possible to call
> zmq_term and have the threads handle the ETERM condition. Now I'm
> required to close a socket which is currently sending or receiving. Not
> a good idea either, is it?

No, the other way round.

1. You call zmq_term()
2. All currently blocking calls and any subsequent calls except for 
zmq_close() return with ETERM
3. You close the sockets

Martin



More information about the zeromq-dev mailing list