From: A. Jesse Jiryu Davis Date: Thu, 26 Mar 2015 10:19:47 +0000 (-0400) Subject: Replace "loop" with "io_loop" in locks example. X-Git-Tag: v4.2.0b1~54^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d75df2ac373ebcf3a7c547c3bf2ee73bb737af7e;p=thirdparty%2Ftornado.git Replace "loop" with "io_loop" in locks example. --- diff --git a/docs/locks.rst b/docs/locks.rst index b67ce95ba..35441aa7f 100644 --- a/docs/locks.rst +++ b/docs/locks.rst @@ -23,7 +23,7 @@ notified by another. Take `~tornado.locks.Condition` as an example: from tornado import ioloop, gen, locks - loop = ioloop.IOLoop.current() + io_loop = ioloop.IOLoop.current() condition = locks.Condition() @@ -46,7 +46,7 @@ notified by another. Take `~tornado.locks.Condition` as an example: # Yield two Futures; wait for waiter() and notifier() to finish. yield [waiter(), notifier()] - loop.run_sync(runner) + io_loop.run_sync(runner) .. testoutput:: @@ -58,10 +58,10 @@ notified by another. Take `~tornado.locks.Condition` as an example: Wait-methods take an optional ``timeout`` argument, which is either an absolute timestamp:: - loop = ioloop.IOLoop.current() + io_loop = ioloop.IOLoop.current() # Wait up to 1 second for a notification. - yield condition.wait(deadline=loop.time() + 1) + yield condition.wait(deadline=io_loop.time() + 1) ...or a `datetime.timedelta` for a deadline relative to the current time::