mozilla-services/circus — pull request #337 by dekkers (2012-12-12 18:54:27+00:00)
Title: Some more gevent fixes

Here are some more fixes related to gevent.

The first commit adds support for the green pyzmq backend in 2.2.0.1 when setting the stream backend to gevent.

The second commit removes the reload of the ioloop module. I don't really understand why it was there, but reloading will undo the monkey patching we do in _patch and we end up with a blocking zmq poller.

The third commit fixes the httpd test that only runs when gevent is installed. The problem was that we terminated it without giving it time to properly shutdown, potentially causing errors of ports already being used in tests after that. Another problem was that sending SIGKILL immediately after SIGTERM didn't give the killed circus process the time to properly terminate all child processes.

The last one fixes signal handling. When using gevent we need to use gevent.signal, see
https://groups.google.com/forum/#!msg/gevent/sHbOftOBBZE/FdRoWHouRGAJ for more information.