Skip to content

Commit 1534327

Browse files
committed
Update docs
Signed-off-by: Manjusaka <[email protected]>
1 parent 01864f8 commit 1534327

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Doc/library/subprocess.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,19 +1534,18 @@ When using the ``timeout`` parameter in functions like :func:`run`,
15341534
:meth:`Popen.wait`, or :meth:`Popen.communicate`,
15351535
users should be aware of the following behaviors:
15361536

1537-
Process Creation Delay
1538-
^^^^^^^^^^^^^^^^^^^^^^
1539-
1540-
The initial process creation itself cannot be interrupted on many platform APIs.
1541-
This means that even when specifying a timeout, you are not guaranteed to see a timeout exception
1542-
until at least after however long process creation takes.
1537+
When using the ``timeout`` parameter in functions like :func:`run`,
1538+
:meth:`Popen.wait`, or :meth:`Popen.communicate`,
1539+
users should be aware of the following behaviors:
15431540

1544-
Extremely Small Timeout Values
1545-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1541+
1. **Process Creation Delay**: The initial process creation itself cannot be interrupted
1542+
on many platform APIs. This means that even when specifying a timeout, you are not
1543+
guaranteed to see a timeout exception until at least after however long process
1544+
creation takes.
15461545

1547-
Setting very small timeout values (such as a few milliseconds) may result
1548-
in almost immediate :exc:`TimeoutExpired` exceptions because
1549-
process creation and system scheduling inherently require time.
1546+
2. **Extremely Small Timeout Values**: Setting very small timeout values (such as a few
1547+
milliseconds) may result in almost immediate :exc:`TimeoutExpired` exceptions because
1548+
process creation and system scheduling inherently require time.
15501549

15511550

15521551
.. _converting-argument-sequence:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Use origional timeout value for :exc:`TimeoutExpired`
1+
Use origional timeout value for :exc:`subprocess.TimeoutExpired`
22
when the func :meth:`subprocess.run` is called with a timeout

0 commit comments

Comments
 (0)