From: Vladimir Prokhoda Date: Thu, 8 Jun 2017 08:38:13 +0000 (+0300) Subject: Added information about timeout arg in Queue get and put methods X-Git-Tag: v5.0.0~73^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2077%2Fhead;p=thirdparty%2Ftornado.git Added information about timeout arg in Queue get and put methods --- diff --git a/tornado/queues.py b/tornado/queues.py index 0041a8008..00fa4e22c 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: