Skip to content

gh-141510: Update mp_length of frozendict to use non atomic operation - #144913

Merged
corona10 merged 1 commit into
python:mainfrom
corona10:gh-141510-non-atomic
Feb 17, 2026
Merged

corona10 merged 1 commit into
python:mainfrom
corona10:gh-141510-non-atomic

Conversation

@corona10

@corona10 corona10 commented Feb 17, 2026 •

Copy link
Copy Markdown
Member
@corona10

Copy link
Copy Markdown
Member Author

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

A frozendict is immutable, its size cannot change, and so it's safe to access it without atomic operation.

@corona10
corona10 merged commit fc05e5e into python:main Feb 17, 2026
49 checks passed
brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request Feb 28, 2026
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants