Skip to content

Commit 8f77194

Browse files
Apply suggestions from code review
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 0e89719 commit 8f77194

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

peps/pep-0788.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ the thread:
9696

9797
Unfortunately, this isn't correct, because of time-of-call to time-of-use
9898
issues; the interpreter might not be finalizing during the call to
99-
:c:func:`Py_IsFinalizing`, but it might start finalizing right after, which
99+
:c:func:`Py_IsFinalizing`, but it might start finalizing immediately afterwards, which
100100
would cause the attachment of a thread state (typically via
101101
:c:func:`PyGILState_Ensure`) to hang the thread.
102102

@@ -155,14 +155,14 @@ The existing APIs are broken and misleading
155155
-------------------------------------------
156156

157157
There are currently two public ways for a user to create and attach their own
158-
:term:`thread state`; manual use of :c:func:`PyThreadState_New` / :c:func:`PyThreadState_Swap`,
159-
and :c:func:`PyGILState_Ensure`. The former, :c:func:`PyGILState_Ensure`,
158+
:term:`thread state`; manual use of :c:func:`PyThreadState_New` & :c:func:`PyThreadState_Swap`,
159+
and :c:func:`PyGILState_Ensure`. The latter, :c:func:`PyGILState_Ensure`,
160160
is `significantly more common <https://grep.app/search?q=pygilstate_ensure>`_.
161161

162162
:c:func:`PyGILState_Ensure` generally crashes during finalization
163163
*****************************************************************
164164

165-
As of this PEP, the current behavior of :c:func:`PyGILState_Ensure` does not
165+
At the time of writing, the current behavior of :c:func:`PyGILState_Ensure` does not
166166
match the documentation. Instead of hanging the thread during finalization
167167
as previously noted, it's extremely common for it to crash with a segmentation
168168
fault. This is a `known issue <https://github.com/python/cpython/issues/124619>`_

0 commit comments

Comments
 (0)