Martin Lucina wrote: > [email protected] said: >> Martin, thanks for the pointer to the zmq-camera example. It handles >> SIGINT/SIGQUIT etc by exiting the process. If I want to interrupt all the >> blocked zmq_recv calls when receiving a SIGINT, how would you suggest me >> approaching this problem? zmq_recv seems to be blocked forever. > > You can't do that (interrupt all blocking calls) right now without killing > the thread, or somehow signalling (e.g. via yet another inproc socket) to > tell it to go away. This is why zmq-camera does not try to do anything > better than exit(). > > Martin, I almost forgot, weren't we going to either change the default > behaviour of zmq_term() or add a flag to say "Please go away NOW!"?
Yes. Sane termination of blocking calls in case of zmq_term is in the pipeline. The idea is that once you call zmq_term on the context, all blocking calls withing the context will exit with specific error code (ESHUTDOWN or similar). Martin _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
