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-116616: Use relaxed atomic ops to access socket module defaulttimeout #116623

Merged
merged 1 commit into from Mar 12, 2024

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Mar 11, 2024

@erlend-aasland
Copy link
Contributor Author

@colesbury, there's also a store in the module exec function. Let me if we need to use atomic access these as well.

@colesbury
Copy link
Contributor

there's also a store in the module exec function...

I don't think we need atomics for the initialization in the module exec function. The module state is not visible to other threads at that point, and the internal import locks provide the necessary synchronization.

@erlend-aasland erlend-aasland merged commit 3b7fe11 into python:main Mar 12, 2024
37 checks passed
@erlend-aasland erlend-aasland deleted the nogil/socket branch March 12, 2024 13:44
@erlend-aasland
Copy link
Contributor Author

Thanks for the patch and the review, @colesbury 😅

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…lttimeout (python#116623)

Co-authored-by: Sam Gross <colesbury@gmail.com>
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…lttimeout (python#116623)

Co-authored-by: Sam Gross <colesbury@gmail.com>
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.

socketmodule.c: use atomics to access defaulttimeout in free-threaded build
2 participants