Skip to content

Commit

Permalink
Replace "loop" with "io_loop" in locks example.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdavis committed Mar 26, 2015
1 parent fe66226 commit d75df2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/locks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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::

Expand All @@ -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::

Expand Down

0 comments on commit d75df2a

Please sign in to comment.