mozilla-services/circus — pull request #334 by dekkers (2012-12-10 01:20:26+00:00)
Title: Add a sleep to poll_for instead of spinning

When using gevent the sleep gives the greenlets responsible for redirecting stdout/stderr a chance to run. Without this some tests fail if gevent is installed.

There are still two issues with gevent. The first one is that with gevent 0.13 I get a lot of errors/timeouts. My guess is that this is because of the issue described at http://zeromq.github.com/pyzmq/eventloop.html#zmq-green. For gevent 1.0 circus currently doesn't correctly with monkey patched subprocess that's done by default in patch_all. I've described the problem at SiteSupport/gevent#222. As far as I can see the best results are gotten with gevent 1.0 with subprocess monkey patching disabled. That's the only gevent setup in which all tests pass.