diff -r 313fd1c819c5 Doc/library/concurrent.futures.rst --- a/Doc/library/concurrent.futures.rst Fri Apr 03 20:53:46 2015 +0300 +++ b/Doc/library/concurrent.futures.rst Tue Apr 14 23:33:15 2015 -0400 @@ -42,7 +42,7 @@ Equivalent to :func:`map(func, *iterables) ` except *func* is executed asynchronously and several calls to *func* may be made concurrently. The - returned iterator raises a :exc:`TimeoutError` if + returned iterator raises a :exc:`.TimeoutError` if :meth:`~iterator.__next__` is called and the result isn't available after *timeout* seconds from the original call to :meth:`Executor.map`. *timeout* can be an int or a float. If *timeout* is not specified or @@ -274,11 +274,11 @@ Return the value returned by the call. If the call hasn't yet completed then this method will wait up to *timeout* seconds. If the call hasn't - completed in *timeout* seconds, then a :exc:`TimeoutError` will be + completed in *timeout* seconds, then a :exc:`.TimeoutError` will be raised. *timeout* can be an int or float. If *timeout* is not specified or ``None``, there is no limit to the wait time. - If the future is cancelled before completing then :exc:`CancelledError` + If the future is cancelled before completing then :exc:`.CancelledError` will be raised. If the call raised, this method will raise the same exception. @@ -287,11 +287,11 @@ Return the exception raised by the call. If the call hasn't yet completed then this method will wait up to *timeout* seconds. If the - call hasn't completed in *timeout* seconds, then a :exc:`TimeoutError` + call hasn't completed in *timeout* seconds, then a :exc:`.TimeoutError` will be raised. *timeout* can be an int or float. If *timeout* is not specified or ``None``, there is no limit to the wait time. - If the future is cancelled before completing then :exc:`CancelledError` + If the future is cancelled before completing then :exc:`.CancelledError` will be raised. If the call completed without raising, ``None`` is returned. @@ -393,7 +393,7 @@ they complete (finished or were cancelled). Any futures given by *fs* that are duplicated will be returned once. Any futures that completed before :func:`as_completed` is called will be yielded first. The returned - iterator raises a :exc:`TimeoutError` if :meth:`~iterator.__next__` is + iterator raises a :exc:`.TimeoutError` if :meth:`~iterator.__next__` is called and the result isn't available after *timeout* seconds from the original call to :func:`as_completed`. *timeout* can be an int or float. If *timeout* is not specified or ``None``, there is no limit to the wait @@ -410,6 +410,20 @@ Exception classes ----------------- +.. currentmodule:: concurrent.futures + +.. exception:: Error + + Derived from :exc:`Exception`, this is the base class for all future-related exceptions. + +.. exception:: CancelledError + + Raised when a future is cancelled. + +.. exception:: TimeoutError + + Raised when a future operation exceeds the given timeout. + .. currentmodule:: concurrent.futures.process .. exception:: BrokenProcessPool