subprocess.Popen.wait doc: mention asyncio to avoid busy loop

This commit is contained in:
Victor Stinner 2014-02-24 13:18:47 +01:00
parent eb44b2d9e8
commit 07171242d5
1 changed files with 6 additions and 0 deletions

View File

@ -629,6 +629,12 @@ Instances of the :class:`Popen` class have the following methods:
:exc:`TimeoutExpired` exception. It is safe to catch this exception and
retry the wait.
.. note::
The function is implemented using a busy loop (non-blocking call and
short sleeps). Use the :mod:`asyncio` module for an asynchronous wait:
see :class:`asyncio.create_subprocess_exec`.
.. warning::
This will deadlock when using ``stdout=PIPE`` and/or