[zeromq-dev] zmq_ctx_term vs zmq_ctx_destroy vs zmq_ctx_shutdown

Indradhanush Gupta indradhanush.gupta at gmail.com
Sat Jun 14 15:34:46 CEST 2014


Hello,

I consulted the docs for zmq_ctx_term and zmq_ctx_destroy, in the API
version 4.0 and it appears to be both have the same description. What is
the difference between the two?
I'm using pyzmq, by the way.

When I called zmq.Context.term() the call blocks indefinitely, while
zmq.Context.destroy() returns immediately. I am shutting down my IOLoop,
then closing all open sockets by hand and only then calling one of the
above.

What is the difference between the two calls? Also, it appears
zmq_ctx_destroy is going to be deprecated according to the 4.1 dev API
docs. Why is term() blocking while destroy() doesn't?

I'm also confused as to when should I call shutdown, destroy or term?

If it helps, I have not set any LINGER option on any of the sockets.

Thanks,
-- 
Indradhanush Gupta
(dhanush on irc)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140614/51778d71/attachment.htm>


More information about the zeromq-dev mailing list