mirror of https://github.com/python/cpython
[doc] Make subprocess.wait documentation more precise (#98700)
[doc] Make subprocess.wait doc more precise An active loop is only used when the `timeout` parameter is used on POSIX. When no timeout is used, the code calls `os.waitpid` internally (which puts the process on a sleep status). On Windows, the internal Windows API call accepts a timeout parameter, so that is delegated to the OS.
This commit is contained in:
parent
985679f05d
commit
81ab0e8a4a
|
@ -791,9 +791,10 @@ Instances of the :class:`Popen` class have the following methods:
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The function is implemented using a busy loop (non-blocking call and
|
When the ``timeout`` parameter is not ``None``, then (on POSIX) the
|
||||||
short sleeps). Use the :mod:`asyncio` module for an asynchronous wait:
|
function is implemented using a busy loop (non-blocking call and short
|
||||||
see :class:`asyncio.create_subprocess_exec`.
|
sleeps). Use the :mod:`asyncio` module for an asynchronous wait: see
|
||||||
|
:class:`asyncio.create_subprocess_exec`.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. versionchanged:: 3.3
|
||||||
*timeout* was added.
|
*timeout* was added.
|
||||||
|
|
Loading…
Reference in New Issue