From d75df2ac373ebcf3a7c547c3bf2ee73bb737af7e Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Thu, 26 Mar 2015 06:19:47 -0400 Subject: [PATCH] Replace "loop" with "io_loop" in locks example. --- docs/locks.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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:: -- 2.47.2