[zeromq-dev] Signal handling in blocking zmq_recv

Chris Wong chris at chriswongstudio.com
Tue Mar 9 19:59:11 CET 2010

>> When would you want to unblock a blocked zmq_recv()? The only time I can
>> think of doing that legitimately is when the entire application/component
>> is going away, in which case we want to change the behaviour of zmq_term()
>> as discussed in my other email.
> I agree that most of the time, you would be exiting the application.
> But, you might want to trigger
> clean up actions of various sorts, before exiting.

That's what the Ruby's signal handler does AFAIK (not entirely sure though). It has a lot of clean-up stuff to do.  I don't even want to get into the details because it's hurting my head just to think about it. ;-)

One of the thing it does (for sure) is to call the internal "finalize" function on each object in the GC system to do resource cleanup.  Like Java, I don't think it's guaranteed, but I observe that it's currently doing it consistently.


> Brian
> -- 
> Brian E. Granger, Ph.D.
> Assistant Professor of Physics
> Cal Poly State University, San Luis Obispo
> bgranger at calpoly.edu
> ellisonbg at gmail.com

More information about the zeromq-dev mailing list