Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
We've added thePyInterpreterConfig struct in 3.12. For PEP 684 (per-interpreter GIL), likewise 3.12, we added a new int-boolean field, "own_gil", to indicate ifPyInterpreterState.ceval.gil should point to the interpreter's own GIL.
Having finally just read through PEP 703 (no-gil), I realized that it would probably be useful to change that field to support a number of different values, rather than just a binary situation. Consequently, I'm proposing we change the field as follows (more or less):
#definePyInterpreterConfig_SHARED_GIL 1/* shared with main interpreter, so PyInterpreterConfig_MAIN_GIL? */#definePyInterpreterConfig_OWN_GIL 2typedefstruct { ...intgil; ...}PyInterpreterConfig;
That would give us more flexibility for other possible future scenarios (e.g. no-gil), where "own_gil" wouldn't make sense.
Changing this in 3.12, even though we're past feature freeze, would be good so we don't have to live with a deprecated field in the struct. I'd be surprised if anyone was really usingPyInterpreterConfig yet, and the change will be very focused, so we should be okay to make this change so late in the game.
CC@Yhg1s
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status