From: Marc Schlaich Date: Fri, 19 Jul 2013 11:36:00 +0000 (+0200) Subject: Make poll timeout patchable. X-Git-Tag: v3.2.0b1~104^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F859%2Fhead;p=thirdparty%2Ftornado.git Make poll timeout patchable. --- diff --git a/tornado/ioloop.py b/tornado/ioloop.py index fe7e276d5..fc61904e1 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -59,6 +59,9 @@ except ImportError: from tornado.platform.auto import set_close_exec, Waker +_POLL_TIMEOUT = 3600.0 + + class TimeoutError(Exception): pass @@ -596,7 +599,7 @@ class PollIOLoop(IOLoop): pass while True: - poll_timeout = 3600.0 + poll_timeout = _POLL_TIMEOUT # Prevent IO event starvation by delaying new callbacks # to the next iteration of the event loop.