]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-138644: Update c-api docs of `PyInterpreterState` about PEP-684 (#138651)
authorsobolevn <mail@sobolevn.me>
Mon, 8 Sep 2025 13:44:44 +0000 (16:44 +0300)
committerGitHub <noreply@github.com>
Mon, 8 Sep 2025 13:44:44 +0000 (16:44 +0300)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Doc/c-api/init.rst

index b99988f743dcf2d359b033935213f50d29905fe5..bb9e08acee14c2cb375e9d6f70a7555ec27d909d 100644 (file)
@@ -1020,6 +1020,12 @@ code, or when embedding the Python interpreter:
    interpreter lock is also shared by all threads, regardless of to which
    interpreter they belong.
 
+   .. versionchanged:: 3.12
+
+      :pep:`684` introduced the possibility
+      of a :ref:`per-interpreter GIL <per-interpreter-gil>`.
+      See :c:func:`Py_NewInterpreterFromConfig`.
+
 
 .. c:type:: PyThreadState
 
@@ -1711,6 +1717,8 @@ function. You can create and destroy them using the following functions:
    haven't been explicitly destroyed at that point.
 
 
+.. _per-interpreter-gil:
+
 A Per-Interpreter GIL
 ---------------------
 
@@ -1722,7 +1730,7 @@ being blocked by other interpreters or blocking any others.  Thus a
 single Python process can truly take advantage of multiple CPU cores
 when running Python code.  The isolation also encourages a different
 approach to concurrency than that of just using threads.
-(See :pep:`554`.)
+(See :pep:`554` and :pep:`684`.)
 
 Using an isolated interpreter requires vigilance in preserving that
 isolation.  That especially means not sharing any objects or mutable