One simple way might be to use an inproc: PUB/SUB socket:
zmq::socket_t kill_me(*ctx, ZMQ_SUB);
s.setsockopt(ZMQ_SUBSCRIBE, "", 0);
Service threads would then poll() both their normal socket and the
"kill" socket. As soon as a message arrived, the thread would cleanup
and quit.
On Jun 30, 2010, at 9:05 PM, Brian Granger wrote:
On Wed, Jun 30, 2010 at 5:27 PM, Matt Weinstein <[email protected]
> wrote:
Under what circumstances do you want to break blocking?
E.g. timeout, connection failure, etc.?
For us, we want to do this when we want to kill a process that is
sitting there blocking in zmq.recv. IOW, we want SIGINT to trigger
the process to shutdown in a semi-clean manner (no seg faults!).
Cheers,
Brian
On Jun 30, 2010, at 10:23 AM, Derek Developer wrote:
Is there any way to break the blocking of zmq_recv() without firing
up a client and sending a message like "QUIT SERVER"?
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
[email protected]
[email protected]
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev