Skip to content

gh-130312: SET_ADD should not lock - #130136

Merged
DinoV merged 4 commits into
python:mainfrom
DinoV:set_add_nolock
Mar 21, 2025
Merged

DinoV merged 4 commits into
python:mainfrom
DinoV:set_add_nolock

Conversation

@DinoV

@DinoV DinoV commented Feb 14, 2025 •

Copy link
Copy Markdown
Contributor
@DinoV DinoV changed the title gh-xxxxx: SET_ADD should not lock Feb 19, 2025
@DinoV
DinoV marked this pull request as ready for review February 19, 2025 18:08
@DinoV
DinoV requested review from colesbury and mpage February 19, 2025 18:11
Comment thread Objects/setobject.c Resolved
Comment thread Objects/setobject.c Resolved
Comment thread Objects/setobject.c Resolved
Comment thread Objects/setobject.c Resolved

@colesbury colesbury 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.

One minor formatting comment below

Comment thread Python/bytecodes.c Outdated
Comment on lines +967 to +980
int err = _PySet_AddTakeRef((PySetObject *)PyStackRef_AsPyObjectBorrow(set),
PyStackRef_AsPyObjectSteal(v));

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.

Suggested change
int err = _PySet_AddTakeRef((PySetObject *)PyStackRef_AsPyObjectBorrow(set),
PyStackRef_AsPyObjectSteal(v));
int err = _PySet_AddTakeRef((PySetObject *)PyStackRef_AsPyObjectBorrow(set),
PyStackRef_AsPyObjectSteal(v));
@mpage

mpage commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

@DinoV - Can this be merged?

@DinoV
DinoV force-pushed the set_add_nolock branch 5 times, most recently from 557ee19 to 73fac71 Compare March 20, 2025 16:36
@DinoV
DinoV merged commit d9411ae into python:main Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants