Skip to content

gh-159486: Set issuperset nested lock - #159487

Closed
johng wants to merge 2 commits into
python:mainfrom
johng:set-issuperset-nested-lock
Closed

johng wants to merge 2 commits into
python:mainfrom
johng:set-issuperset-nested-lock

Conversation

@johng

@johng johng commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

johng added 2 commits October 15, 2026 21:27
…uild

`set_issuperset_impl()` is already locked but calls `set_issubset` which
just wraps a lock to `set_issubset_impl`
Comment thread Objects/setobject.c
@picnixz

picnixz commented Oct 15, 2026

Copy link
Copy Markdown
Member

Are there othre places in the code where we have that useless double locking (not just limited to set, but limited to methods that do @critical_section and invoke another method that also does @critical_section?)

@johng

johng commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

This came about from some sweeping research with claude but nothing else significant was found but I can try again focusing on the critical section tags.

@picnixz

picnixz commented Oct 15, 2026

Copy link
Copy Markdown
Member

If possible, please do so. That way we can just fix this in one go. If there are too many files, we can make focused PRs, but for mechanical changes like this, it's sometimes better to search beyond the scope of the file.

@johng

johng commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

#159559 for 5 found items which also seemed like low hanging fruit

@johng johng closed this Oct 16, 2026
Sign up for free to 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