Skip to content

gh-112075: Enable freeing with qsbr and fallback to lock on key changed - #116336

Merged
markshannon merged 1 commit into
python:mainfrom
DinoV:nogil_dict_small_tweaks
Mar 5, 2024
Merged

gh-112075: Enable freeing with qsbr and fallback to lock on key changed#116336
markshannon merged 1 commit into
python:mainfrom
DinoV:nogil_dict_small_tweaks

Conversation

@DinoV

@DinoVDinoV commented Mar 4, 2024

Copy link
Copy Markdown
Contributor

Couple of small tweaks for dict thread safety:

  1. Start freeing objects using QSBR now that the API is there
  2. Fix an issue where we're not handling DKIX_KEY_CHANGED when storing instance attributes. This was introduced with gh-112075: Avoid locking shared keys on every assignment #116087 and got exposed when combining it with GH-115776: Embed the values array into the object, for "normal" Python objects. #116115

@DinoV
DinoV requested a review from colesburyMarch 4, 2024 22:27
@DinoVDinoV changed the title Enable freeing with qsbr and fallback to lock on key changedgh-112075: Enable freeing with qsbr and fallback to lock on key changedMar 4, 2024
@colesburycolesbury added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Mar 4, 2024
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @colesbury for commit df67d40 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Mar 4, 2024

@colesburycolesbury left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but I suggest waiting for the refleak buildbots because it tends to be sensitive to the QSBR stuff

@DinoV
DinoV marked this pull request as ready for review March 4, 2024 22:42
@markshannon
markshannon merged commit ffcc450 into python:mainMar 5, 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_dict_small_tweaks 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.

4 participants

@DinoV@bedevere-bot@colesbury@markshannon