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

Make_struct module thread-safe in--disable-gil builds #112062

Closed
Assignees
chgnrdv
@colesbury

Description

@colesbury

Feature or enhancement

The_struct module has a few small issues:

  • The use ofPyDict_GetItemWithError returns a borrowed reference (should usePyDict_GetItemRef)
  • Thestate->cache is lazily created; we should instead create it during_structmodule_exec
  • We wantstate->cache to be an immutable reference to a mutable dict. (Thedict will be thread-safe.) UsePyDict_Clear to empty the dict instead of clearing the reference.

See the commit from thenogil-3.12 fork for context:colesbury/nogil-3.12@ada9b73feb. Note that in CPython the relevant function isPyDict_GetItemRef notPyDict_FetchItemWithError.

Linked PRs

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp