Skip to content

Commit e2ddc27

Browse files
Add a NEWS entry.
1 parent 51d8587 commit e2ddc27

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Multi-phase init extension modules may now indicate that they support
2+
running in subinterpreters that have their own GIL. This is done by using
3+
``Py_MOD_PER_INTERPRETER_GIL_SUPPORTED`` as the value for the
4+
``Py_mod_multiple_interpreters`` module def slot. Otherwise the module, by
5+
default, cannot be imported in such subinterpreters. (This does not affect
6+
the main interpreter or subinterpreters that do not have their own GIL.) In
7+
addition to the isolation that multi-phase init already normally requires,
8+
support for per-interpreter GIL involves one additional constraint:
9+
thread-safety. If the module has external (linked) dependencies and those
10+
libraries have any state that isn't thread-safe then the module must do the
11+
additional work to add thread-safety. This should be an uncommon case.

0 commit comments

Comments
 (0)