From: Ben Darnell Date: Sat, 9 Feb 2013 01:14:13 +0000 (-0500) Subject: Clarify docstring of IOLoop.stop. X-Git-Tag: v3.0.0~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=280c286329f6d90eae33612ef887423c1af5c3eb;p=thirdparty%2Ftornado.git 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. --- 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()