Skip to content

gh-129107: two cases where second operand needs lock #130227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 27, 2025

Conversation

tom-pytel
Copy link
Contributor

@tom-pytel tom-pytel commented Feb 17, 2025

Identified three cases where a second operand needs to be locked. Also double checked other two operand functions:

  • PyByteArray_Concat
  • bytearray_richcompare

But those "lock" both self and their counterparts purely through the buffer mechanism so there are no issues in those.

@tom-pytel
Copy link
Contributor Author

Ping @kumaraditya303

@tom-pytel
Copy link
Contributor Author

I added a lock for the second operand in bytearray_iconcat as well because self is locked and getting the buffer for the second operand may involve locking self for that operand (as it does in bytearray).

@tom-pytel
Copy link
Contributor Author

ping @colesbury

@kumaraditya303 kumaraditya303 merged commit e85f81f into python:main Feb 27, 2025
46 checks passed
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants