File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1020,6 +1020,12 @@ code, or when embedding the Python interpreter:
1020
1020
interpreter lock is also shared by all threads, regardless of to which
1021
1021
interpreter they belong.
1022
1022
1023
+ .. versionchanged:: 3.12
1024
+
1025
+ :pep:`684` introduced the possibility
1026
+ of a :ref:`per-interpreter GIL <per-interpreter-gil>`.
1027
+ See :c:func:`Py_NewInterpreterFromConfig`.
1028
+
1023
1029
1024
1030
.. c:type:: PyThreadState
1025
1031
@@ -1711,6 +1717,8 @@ function. You can create and destroy them using the following functions:
1711
1717
haven't been explicitly destroyed at that point.
1712
1718
1713
1719
1720
+ .. _per-interpreter-gil:
1721
+
1714
1722
A Per-Interpreter GIL
1715
1723
---------------------
1716
1724
@@ -1722,7 +1730,7 @@ being blocked by other interpreters or blocking any others. Thus a
1722
1730
single Python process can truly take advantage of multiple CPU cores
1723
1731
when running Python code. The isolation also encourages a different
1724
1732
approach to concurrency than that of just using threads.
1725
- (See :pep:`554`.)
1733
+ (See :pep:`554` and :pep:`684` .)
1726
1734
1727
1735
Using an isolated interpreter requires vigilance in preserving that
1728
1736
isolation. That especially means not sharing any objects or mutable
You can’t perform that action at this time.
0 commit comments