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: Disable the function/code cache in free-threaded builds #118301

Merged
merged 3 commits into from
May 3, 2024

Conversation

mpage
Copy link
Contributor

@mpage mpage commented Apr 26, 2024

This is only used by the specializing interpreter and the tier 2 optimizer, both of which are disabled in free-threaded builds.

Additionally, make function version generation thread-safe in free-threaded builds. I don't think anything outside of the specializing interpreter / tier 2 optimizer actually uses this, so we could allow version generation to race if we're concerned about introducing a bottleneck with the lock.

Sample race that is fixed.

This is only used by the specializing interpreter and the tier 2
optimizer, both of which are disabled in free-threaded builds.

[Sample race](https://gist.github.com/mpage/d05a1c4616eedc9337f3f335e6485f91) that is fixed.
@mpage mpage requested a review from colesbury May 1, 2024 21:22
@mpage mpage marked this pull request as ready for review May 1, 2024 21:22
@mpage mpage requested a review from markshannon as a code owner May 1, 2024 21:22
@colesbury colesbury merged commit 37d0950 into python:main May 3, 2024
37 checks passed
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
…lds (python#118301)

This is only used by the specializing interpreter and the tier 2
optimizer, both of which are disabled in free-threaded builds.
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