[zeromq-dev] How to gracefully terminate ZMQ

Christian Gudrian christian at gudrian.org
Mon Feb 28 09:17:22 CET 2011


According to the documentation one is required to close all open sockets 
before terminating the context. Otherwise zmq_term might block forever. 
But what do I need to do if one thread is currently within a blocking 
call to zmq_send or zmq_recv? 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?


More information about the zeromq-dev mailing list