From: Ben Darnell Date: Wed, 6 May 2015 05:04:09 +0000 (-0700) Subject: Document (ignored) timeout argument to Future methods. X-Git-Tag: v4.2.0b1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd3aabdddfe88ef8a4b312e40b314ceb452a1cf9;p=thirdparty%2Ftornado.git Document (ignored) timeout argument to Future methods. Closes #1435. --- diff --git a/tornado/concurrent.py b/tornado/concurrent.py index 51ae239fb..479ca022e 100644 --- a/tornado/concurrent.py +++ b/tornado/concurrent.py @@ -203,6 +203,10 @@ class Future(object): def result(self, timeout=None): """If the operation succeeded, return its result. If it failed, re-raise its exception. + + This method takes a ``timeout`` argument for compatibility with + `concurrent.futures.Future` but it is an error to call it + before the `Future` is done, so the ``timeout`` is never used. """ self._clear_tb_log() if self._result is not None: @@ -215,6 +219,10 @@ class Future(object): def exception(self, timeout=None): """If the operation raised an exception, return the `Exception` object. Otherwise returns None. + + This method takes a ``timeout`` argument for compatibility with + `concurrent.futures.Future` but it is an error to call it + before the `Future` is done, so the ``timeout`` is never used. """ self._clear_tb_log() if self._exc_info is not None: