-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-114940: Add a Per-Interpreter Lock For the List of Thread States #127037
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-114940: Add a Per-Interpreter Lock For the List of Thread States #127037
Conversation
HEAD_LOCK(runtime); | ||
if (runtime->stoptheworld.requested) { | ||
decrement_stoptheworld_countdown(&runtime->stoptheworld); | ||
} | ||
HEAD_UNLOCK(runtime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is correct, but need to double-check.
It seems that there is an error in CI, I will refer to your implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, this was an issue that could not be changed because it would cause unexpected issues with CI (it was originally changed in my PR)
I have factored out gh-127077 and will later update this PR on top of it. |
The new lock may be used instead of the global "HEAD" lock. That global lock guards the list of interpreters, but unfortunately also gets used as a generic "lock everything". This change helps us move away from that situation.
FYI, this is very similar to gh-125561.