Skip to content

Commit 4e0c0fd

Browse files
committed
Add clarification for 'modern versions'
1 parent b918224 commit 4e0c0fd

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

peps/pep-0788.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,14 @@ created by the authors of this PEP:
183183
omit ``PyGILState_Ensure`` in fresh threads.
184184

185185
In reality, :c:func:`PyGILState_Ensure` doesn't just "acquire the GIL" in
186-
modern versions. It attaches a :term:`thread state` for the current
187-
thread--*that's* what lets a thread invoke the C API. On with-GIL builds,
188-
holding an :term:`attached thread state` implies holding the GIL, so only one
189-
thread can have one at a time. Free-threaded builds achieve the effect of
190-
multi-core parallism while remaining backwards-compatible by simply removing
191-
that limitation: threads still need a thread state (and thus need to call
192-
:c:func:`PyGILState_Ensure`), but they don't need to wait on one another to
193-
do so.
186+
modern versions (that being since 3.12). It attaches a :term:`thread state`
187+
for the current thread--*that's* what lets a thread invoke the C API. On
188+
with-GIL builds, holding an :term:`attached thread state` implies holding the
189+
GIL, so only one thread can have one at a time. Free-threaded builds achieve
190+
the effect of multi-core parallism while remaining backwards-compatible by
191+
simply removing that limitation: threads still need a thread state (and thus
192+
need to call :c:func:`PyGILState_Ensure`), but they don't need to wait on one
193+
another to do so.
194194

195195
Subinterpreters don't work with :c:func:`PyGILState_Ensure`
196196
-----------------------------------------------------------

0 commit comments

Comments
 (0)