[zeromq-dev] Clean termination when using zmq_proxy

Brad Taylor cbradtaylor at gmail.com
Sun Mar 24 19:58:30 CET 2013


So, if the worker thread receives a control message, such as shutdown, does a zmq_ctx_destroy(), that will cause the zmq_proxy to exit with -1.  What about the other worker threads that would normally be in a blocking zmq_msg_recv?  I assume they would get a -1 return as well.  And if a worker happened to be doing something, the next time they did a zmq_ function they would get a -1 exit as well?
On Mar 24, 2013, at 1:52 PM, Pieter Hintjens <pieterh at gmail.com> wrote:

> If you terminate the context it's using, it should exit cleanly.
> 
> Pieter
> 
> On Mar 24, 2013 7:50 PM, "Brad Taylor" <cbradtaylor at gmail.com> wrote:
> Is there a simple way to design a daemon type process that uses zmq_proxy to distribute work to have a technique for a clean shutdown?  I would like to send a message to the daemon, that would tell it to shutdown.  The daemon will be a basic multi-threaded server.  The work will be distributed to various worker threads.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130324/9187a519/attachment.htm>


More information about the zeromq-dev mailing list