File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1018,6 +1018,9 @@ code, or when embedding the Python interpreter:
1018
1018
Threads belonging to different interpreters initially share nothing, except
1019
1019
process state like available memory, open file descriptors and such.
1020
1020
1021
+ .. versionchanged:: 3.12
1022
+ Each subinterpreter now :ref:`has its own GIL <per-interpreter-gil>`.
1023
+
1021
1024
1022
1025
.. c:type:: PyThreadState
1023
1026
@@ -1709,6 +1712,8 @@ function. You can create and destroy them using the following functions:
1709
1712
haven't been explicitly destroyed at that point.
1710
1713
1711
1714
1715
+ .. _per-interpreter-gil:
1716
+
1712
1717
A Per-Interpreter GIL
1713
1718
---------------------
1714
1719
@@ -1720,7 +1725,7 @@ being blocked by other interpreters or blocking any others. Thus a
1720
1725
single Python process can truly take advantage of multiple CPU cores
1721
1726
when running Python code. The isolation also encourages a different
1722
1727
approach to concurrency than that of just using threads.
1723
- (See :pep:`554`.)
1728
+ (See :pep:`554` and :pep:`684` .)
1724
1729
1725
1730
Using an isolated interpreter requires vigilance in preserving that
1726
1731
isolation. That especially means not sharing any objects or mutable
You can’t perform that action at this time.
0 commit comments