Skip to content
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

gh-117657: Using critical section to make _socket.socket.close thread safe #120490

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

aisk
Copy link
Member

@aisk aisk commented Jun 14, 2024

This function has a temporary variable fd which will be fetched and stored from or to _socket.socket.fd, so using critical section to make it thread safe with free-threads build.

@aisk aisk changed the title Using critical section to make _socket.socket.close thread safe gh-117657: Using critical section to make _socket.socket.close thread safe Jun 14, 2024
@aisk aisk added the skip news label Jun 14, 2024
@Fidget-Spinner
Copy link
Member

Will wait some time for someone else to give a review if they want to.

Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

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

It looks straightforward to me :)

@encukou encukou merged commit 8a51767 into python:main Jul 1, 2024
38 checks passed
@aisk aisk deleted the sock-close-race branch July 1, 2024 16:56
Akasurde pushed a commit to Akasurde/cpython that referenced this pull request Jul 3, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
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.

4 participants