diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index b99988f743dcf2..b6dda837f739c0 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1016,9 +1016,10 @@ code, or when embedding the Python interpreter: this structure. Threads belonging to different interpreters initially share nothing, except - process state like available memory, open file descriptors and such. The global - interpreter lock is also shared by all threads, regardless of to which - interpreter they belong. + process state like available memory, open file descriptors and such. + + .. versionchanged:: 3.12 + Each subinterpreter now :ref:`has its own GIL `. .. c:type:: PyThreadState @@ -1711,6 +1712,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 +1725,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