[zeromq-dev] behavior of zmq_term in 2.1.0
Chuck Remes
cremes.devlist at mac.com
Sat Nov 27 22:01:45 CET 2010
I'm unsure how zmq_term() is supposed to behave in 2.1.0 and later. The docs describe its blocking behavior like so:
After iterrupting all blocking calls, _zmq_term()_ blocks until all sockets
open within the context are closed using _zmq_close()_ and either all the
pending outbound messages are pushed to the network or ZMQ_LINGER period
expires for individual sockets.
The behavior that I see is that the program blocks indefinitely until I manually call zmq_close(). This is true regardless of whether or not there are messages in queue. If I set ZMQ_LINGER to 0 for the socket, a call to zmq_term() still blocks indefinitely.
Is zmq_term() supposed to call zmq_close() on all known sockets on my behalf or do I need to keep a list of these sockets and iterate over them calling zmq_close()?
cr
More information about the zeromq-dev
mailing list