benoitc/gunicorn — pull request #377 by Glandos (2012-07-15 15:08:01+00:00)
Title: Use a dynamic timeout to wait for the optimal time.

Trying to solve #374.

I hope it is clean enough. As @davisp said, the engineering should stay as simple as possible, and I guess that the math behind this change is quite simple.

The goal is just to get the worker that hadn't notified for the longest time, and then just wait for the remaining time, until the timeout should occurs.

If the timeout is too small or already reached, we just use 1.0 as before.