Skip to content

gh-112075: Avoid locking shared keys on every assignment - #116087

Merged
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_avoid_keys_lock_on_set
Feb 29, 2024
Merged

gh-112075: Avoid locking shared keys on every assignment#116087
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_avoid_keys_lock_on_set

Conversation

@DinoV

@DinoVDinoV commented Feb 29, 2024

Copy link
Copy Markdown
Contributor

Currently we lock the shared keys on every assignment to an instance attribute. Now that we have thread-safe gets we can use that instead.

@DinoV
DinoVforce-pushed the nogil_avoid_keys_lock_on_set branch from af52498 to 22d7bfbCompareFebruary 29, 2024 02:25
@DinoV
DinoV marked this pull request as ready for review February 29, 2024 02:43
Comment threadObjects/dictobject.c Outdated
Comment threadObjects/dictobject.c Outdated
Comment threadObjects/dictobject.c Outdated
@DinoV
DinoVforce-pushed the nogil_avoid_keys_lock_on_set branch from d6e97e9 to 8812f5bCompareFebruary 29, 2024 19:14
@DinoV
DinoV merged commit 556749c into python:mainFeb 29, 2024
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@DinoV
DinoV deleted the nogil_avoid_keys_lock_on_set branch May 31, 2024 18:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@DinoV@colesbury