Jeffrey Yasskin added the comment:

It seems that .await_request() was only added a month ago to fix issue
742598, so it's no great hardship to refactor it again now. Timeouts
never worked for .serve_forever() because the try/except in
.handle_request() turned their exception into a plain return, which
didn't stop .server_forever() from looping. Timeouts also seem to be
unnecessary in a situation in which shutdown works. Shutdown can only be
called from a separate thread, and when you have more threads you can
also do periodic tasks in them.

So I've made that explicit: the .serve_forever/shutdown combination
doesn't handle timeouts. [This has nothing to do with the fact that it
takes three times as much code to handle them. Don't look at the excuse
behind the curtain. ;)]

This patch needs some more documentation and a NEWS entry before it gets
submitted, but I want to check that everyone would be happy with the
concept.

----------
nosy: +akuchling, pilcrow
versions: +Python 2.6, Python 3.0
Added file: http://bugs.python.org/file9581/polling_shutdown.patch

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1193577>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to