]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Condition.wait examples should show timeout, not deadline.
authorA. Jesse Jiryu Davis <jesse@mongodb.com>
Sun, 19 Apr 2015 02:40:34 +0000 (22:40 -0400)
committerA. Jesse Jiryu Davis <jesse@mongodb.com>
Sun, 19 Apr 2015 02:40:34 +0000 (22:40 -0400)
tornado/locks.py

index 914187c97df433c868719cc01645d9f8ad173e9d..77340abcc47b0f0934c7825aa338e4d4a7f4767f 100644 (file)
@@ -95,12 +95,12 @@ class Condition(_TimeoutGarbageCollector):
         io_loop = ioloop.IOLoop.current()
 
         # Wait up to 1 second for a notification.
-        yield condition.wait(deadline=io_loop.time() + 1)
+        yield condition.wait(timeout=io_loop.time() + 1)
 
-    ...or a `datetime.timedelta` for a deadline relative to the current time::
+    ...or a `datetime.timedelta` for a timeout relative to the current time::
 
         # Wait up to 1 second.
-        yield condition.wait(deadline=datetime.timedelta(seconds=1))
+        yield condition.wait(timeout=datetime.timedelta(seconds=1))
 
     The method raises `tornado.gen.TimeoutError` if there's no notification
     before the deadline.