benoitc/gunicorn — pull request #962 by benoitc (2014-12-20 10:19:44+00:00)
Title: stop to accept more requests when maximum accepted is achieved

this change makes sure that a worker don't handle more requests than it can
achieved. The new workflow is quite more simple:

listeners are put in the poller. On read we try to accept on them.
When a connection is accepted it is put in the execution queue
When a request is done and the socket can be kept alived, we put it in the
poller, on read event we will try to handle the new request. If it is not put
out of the poller before the keepalive timeout the socket will be closed.
if all threads are busy we are waiting until one request complet. If it
doesn't complete before the timeout we kill the worker.

fix #908