[zeromq-dev] Clean termination when using zmq_proxy
Pieter Hintjens
ph at imatix.com
Mon Mar 25 00:16:30 CET 2013
Yes, if they're on the same context. It's harder to kill a process
with detached threads; you have to send them explicit shutdown
messages.
There are quite a few examples like this in the Guide.
-Pieter
On Sun, Mar 24, 2013 at 7:58 PM, Brad Taylor <cbradtaylor at gmail.com> wrote:
> 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
>
>
More information about the zeromq-dev
mailing list