Jeffrey Yasskin added the comment: Polling isn't a great way to handle shutdown, since it wastes CPU time and decreases responsiveness, but it's also easy and my attempt to avoid it isn't getting anywhere, so I'm planning to fix up your patch a bit and commit it. Thanks!
I've merged your patch with my conflicting change in the trunk and re-attached it. Two things: 1) This patch may interfere with the existing timeout in await_request. We may be able to re-use that instead of having two select statements. 2) I believe it's important to provide a way to block until the server isn't accepting any more requests and to block until all active requests are finished running. If the active requests depend on other bits of the system, blocking until they're done would help them terminate gracefully. It would also be useful to give users a more proactive way to kill active requests, perhaps by listing the handler objects associated with them (or their PIDs for forking servers). It's surprisingly complicated to avoid race conditions in these implementations, especially without support from the Server object. Added file: http://bugs.python.org/file9579/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