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:
10181018 Threads belonging to different interpreters initially share nothing, except
10191019 process state like available memory, open file descriptors and such.
10201020
1021+ .. versionchanged:: 3.12
1022+ Each subinterpreter now :ref:`has its own GIL <per-interpreter-gil>`.
1023+
10211024
10221025.. c:type:: PyThreadState
10231026
@@ -1709,6 +1712,8 @@ function. You can create and destroy them using the following functions:
17091712 haven't been explicitly destroyed at that point.
17101713
17111714
1715+ .. _per-interpreter-gil:
1716+
17121717A Per-Interpreter GIL
17131718---------------------
17141719
@@ -1720,7 +1725,7 @@ being blocked by other interpreters or blocking any others. Thus a
17201725single Python process can truly take advantage of multiple CPU cores
17211726when running Python code. The isolation also encourages a different
17221727approach to concurrency than that of just using threads.
1723- (See :pep:`554`.)
1728+ (See :pep:`554` and :pep:`684` .)
17241729
17251730Using an isolated interpreter requires vigilance in preserving that
17261731isolation. That especially means not sharing any objects or mutable
You can’t perform that action at this time.
0 commit comments