]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Added information about timeout arg in Queue get and put methods 2077/head
authorVladimir Prokhoda <v.prokhoda@corp.mail.ru>
Thu, 8 Jun 2017 08:38:13 +0000 (11:38 +0300)
committerVladimir Prokhoda <v.prokhoda@corp.mail.ru>
Thu, 8 Jun 2017 10:26:30 +0000 (13:26 +0300)
tornado/queues.py

index 0041a8008646d5d4fb22decd59011a1ed2f354de..00fa4e22ca0ba0fd54c0d5b928e09c981ad539c6 100644 (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: