Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rename "own_gil" Field of PyInterpreterConfig to "gil" #105603

Closed
@ericsnowcurrently

Description

@ericsnowcurrently

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

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp