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

gh-112062: Make_struct module thread-safe in--disable-gil builds#112094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kumaraditya303 merged 2 commits intopython:mainfromchgnrdv:make-_struct-thread-safe-in-nogil
Nov 15, 2023
Merged

gh-112062: Make_struct module thread-safe in--disable-gil builds#112094

kumaraditya303 merged 2 commits intopython:mainfromchgnrdv:make-_struct-thread-safe-in-nogil
Nov 15, 2023

Conversation

chgnrdv
Copy link
Contributor

@chgnrdvchgnrdv commentedNov 14, 2023
edited by colesbury
Loading

Fixes#112062

  • clear cache dict but preserve the reference in_clearcache_impl
  • create cache dict in_structmodule_exec

* use `PyDict_GetItemRef` instead of `PyDict_GetItemWithError` in `cache_struct_converter` to avoid usage of borrowed ref with explicit incref* clear cache dict but preserve the reference in `_clearcache_impl`* create cache dict in `_structmodule_exec`
@colesbury
Copy link
Contributor

Thanks@chgnrdv. This is going to conflict with@serhiy-storchaka's#112076, which also makes_struct.c usePyDict_GetItemRef.

Maybe remove that part and just keep the changes to_clearcache_impl and_structmodule_exec?

chgnrdv reacted with thumbs up emoji

Copy link
Contributor

@colesburycolesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks, this lgtm.@kumaraditya303, would you please review this change?

Copy link
Contributor

@kumaraditya303kumaraditya303 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@kumaraditya303kumaraditya303 merged commit4744f59 intopython:mainNov 15, 2023
aisk pushed a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
… builds (python#112094)*pythongh-112062: Make `_struct` module thread-safe in --disable-gil builds
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
… builds (python#112094)*pythongh-112062: Make `_struct` module thread-safe in --disable-gil builds
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@colesburycolesburycolesbury approved these changes

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Make_struct module thread-safe in--disable-gil builds
3 participants
@chgnrdv@colesbury@kumaraditya303

[8]ページ先頭

©2009-2025 Movatter.jp