From 280c286329f6d90eae33612ef887423c1af5c3eb Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Fri, 8 Feb 2013 20:14:13 -0500 Subject: [PATCH] Clarify docstring of IOLoop.stop. The mention of "after the current iteration" was meant to emphasize that the stop was not instantaneous, but it could have also been read as a guarantee that one more poll call would take place. Closes #672. --- tornado/ioloop.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tornado/ioloop.py b/tornado/ioloop.py index 363cf4434..e81476b64 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -264,7 +264,8 @@ class IOLoop(Configurable): raise NotImplementedError() def stop(self): - """Stop the loop after the current event loop iteration is complete. + """Stop the I/O loop. + If the event loop is not currently running, the next call to start() will return immediately. @@ -280,6 +281,8 @@ class IOLoop(Configurable): Note that even after `stop` has been called, the IOLoop is not completely stopped until `IOLoop.start` has also returned. + Some work that was scheduled before the call to `stop` may still + be run before the IOLoop shuts down. """ raise NotImplementedError() -- 2.47.2