-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…4206) Py_MOD_PER_INTERPRETER_GIL_SUPPORTED is a new supported value for Py_mod_multiple_interpreters, added in gh-104205.
- Loading branch information
1 parent
3b14b51
commit fff193b
Showing
5 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Misc/NEWS.d/next/Core and Builtins/2023-05-05-13-18-56.gh-issue-99113.hT1ajK.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Multi-phase init extension modules may now indicate that they support | ||
running in subinterpreters that have their own GIL. This is done by using | ||
``Py_MOD_PER_INTERPRETER_GIL_SUPPORTED`` as the value for the | ||
``Py_mod_multiple_interpreters`` module def slot. Otherwise the module, by | ||
default, cannot be imported in such subinterpreters. (This does not affect | ||
the main interpreter or subinterpreters that do not have their own GIL.) In | ||
addition to the isolation that multi-phase init already normally requires, | ||
support for per-interpreter GIL involves one additional constraint: | ||
thread-safety. If the module has external (linked) dependencies and those | ||
libraries have any state that isn't thread-safe then the module must do the | ||
additional work to add thread-safety. This should be an uncommon case. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters