From fa41dd7d049b8552cc3704d8c6e1bc029f303336 Mon Sep 17 00:00:00 2001 From: Marc Schlaich Date: Fri, 19 Jul 2013 13:36:00 +0200 Subject: [PATCH] Make poll timeout patchable. --- tornado/ioloop.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- 2.47.2