Skip to content

Commit 27b7c9f

Browse files
committed
Re-wording
1 parent b0c9890 commit 27b7c9f

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Doc/library/subprocess.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,17 +803,20 @@ Instances of the :class:`Popen` class have the following methods:
803803

804804
.. note::
805805

806-
When ``timeout`` is not ``None``, an efficient event-driven mechanism
807-
waits for process termination when available:
806+
When ``timeout`` is not ``None`` and the platform supports it, an
807+
efficient event-driven mechanism is used to wait for process termination:
808808

809809
- Linux ≥= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`
810810
- macOS and other BSD variants use :func:`select.kqueue` +
811811
``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``
812812
- Windows uses ``WaitForSingleObject``
813813

814814
If none of these mechanisms are available, the function falls back to a
815-
busy loop (non-blocking call and short sleeps). Use the :mod:`asyncio`
816-
module for an asynchronous wait: see
815+
busy loop (non-blocking call and short sleeps).
816+
817+
.. note::
818+
819+
Use the :mod:`asyncio` module for an asynchronous wait: see
817820
:class:`asyncio.create_subprocess_exec`.
818821

819822
.. versionchanged:: 3.3

Doc/whatsnew/3.15.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,13 +739,14 @@ ssl
739739
subprocess
740740
----------
741741

742-
* :meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None``, an efficient
743-
event-driven mechanism now waits for process termination, if available:
742+
* :meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None`` and the
743+
platform supports it, an efficient event-driven mechanism is used to wait for
744+
process termination:
744745

745746
- Linux ≥= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`
746747
- macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC``
747748
+ ``KQ_NOTE_EXIT``
748-
- Windows keep using ``WaitForSingleObject`` (unchanged)
749+
- Windows keeps using ``WaitForSingleObject`` (unchanged)
749750

750751
If none of these mechanisms are available, the function falls back to the
751752
traditional busy loop (non-blocking call and short sleeps).

0 commit comments

Comments
 (0)