From e34ea5c739366c06ee99997a35da97d4f838dec2 Mon Sep 17 00:00:00 2001 From: Vladimir Prokhoda Date: Thu, 8 Jun 2017 11:38:13 +0300 Subject: [PATCH] Added information about timeout arg in Queue get and put methods --- tornado/queues.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tornado/queues.py b/tornado/queues.py index 0041a800..00fa4e22 100644 --- a/tornado/queues.py +++ b/tornado/queues.py @@ -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: