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 <piet...@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" <cbradtay...@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@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to