]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Clarify docstring of IOLoop.stop.
authorBen Darnell <ben@bendarnell.com>
Sat, 9 Feb 2013 01:14:13 +0000 (20:14 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 9 Feb 2013 01:14:13 +0000 (20:14 -0500)
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

index 363cf44342874f9e4ef27e593ce85ce9bf9b049f..e81476b649a290b128cfc9631dfa30816c23a9bf 100644 (file)
@@ -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()