Added information about timeout arg in Queue get and put methods

This commit is contained in:
Vladimir Prokhoda 2017-06-08 11:38:13 +03:00
parent 62e47215ce
commit e34ea5c739
1 changed files with 10 additions and 0 deletions

View File

@ -168,6 +168,11 @@ class Queue(object):
Returns a Future, which raises `tornado.gen.TimeoutError` after a
timeout.
``timeout`` may be a number denoting a time (on the same
scale as `tornado.ioloop.IOLoop.time`, normally `time.time`), or a
`datetime.timedelta` object for a deadline relative to the
current time.
"""
try:
self.put_nowait(item)
@ -200,6 +205,11 @@ class Queue(object):
Returns a Future which resolves once an item is available, or raises
`tornado.gen.TimeoutError` after a timeout.
``timeout`` may be a number denoting a time (on the same
scale as `tornado.ioloop.IOLoop.time`, normally `time.time`), or a
`datetime.timedelta` object for a deadline relative to the
current time.
"""
future = Future()
try: