Clarify description of wait().

This commit is contained in:
Guido van Rossum 2013-01-04 10:35:19 -08:00
parent 14a51c65dd
commit facc0c00cc
1 changed files with 7 additions and 6 deletions

View File

@ -765,12 +765,13 @@ and ``as_completed()`` APIs in the ``concurrent.futures`` package are
provided: provided:
- ``tulip.wait(fs, ...)``. Wait for the Futures or coroutines given - ``tulip.wait(fs, ...)``. Wait for the Futures or coroutines given
by ``fs`` to complete. This is a coroutine whose result on success by ``fs`` to complete. Coroutine arguments will be wrapped in Tasks
is a tuple of two sets of Futures, ``(done, not_done)``. Optional (see below). The result is a tuple of two sets of Futures, ``(done,
arguments ``timeout`` and ``return_when`` have the same meaning and not_done)``. Optional arguments ``timeout`` and ``return_when``
defaults as for ``concurrent.futures.wait()``. The constants have the same meaning and defaults as for
``FIRST_COMPLETED``, ``FIRST_EXCEPTION``, ``ALL_COMPLETED`` are ``concurrent.futures.wait()``. The constants ``FIRST_COMPLETED``,
defined with the same values and the same meanings as in PEP 3148. ``FIRST_EXCEPTION``, ``ALL_COMPLETED`` are defined with the same
values and the same meanings as in PEP 3148.
- ``as_completed(fs, ...)``. Return an iterator whose values are - ``as_completed(fs, ...)``. Return an iterator whose values are
coroutines; waiting for successive values waits until the next coroutines; waiting for successive values waits until the next