pika/pika — pull request #388 by michaelplaing (2013-08-09 23:38:25+00:00)
Title: libev_connection: improve signal handling; add callback for signals; add documentation

This now works reliably and fast on both my mac and in Amazon linux running in the AWS cloud.

If a callback is provided, SIGINT and SIGTERM will be watched for and cause it to be called upon occurence. Therefore there is no longer any need for 'debug=True' in the io_loop, allowing (reasonably) safe use of the default_loop, which is preferable. One can still provide a custom io_loop if desired. Caveat emptor.