Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-134745: Change PyThread_allocate_lock() implementation to PyMutex#134747
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This draft PR currently only modify
|
@colesbury: What do you think of this idea? Does it make sense? Do you see any possible issue? If the approach makes sense, I will update my PR to modify also the Windows implementation. |
I think the idea is fine, but the PR title and description are confusing. cpython/Modules/_threadmodule.c Lines 757 to 760 inf6f4e8a
This PR changes the implementation of the C API I think it's okay to change the implementation of |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Don't call signal handlers if interrupted, only return PY_LOCK_INTR.
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.
This LGTM, but I think you should include a NEWS entry. One behavioral change is that previouslyintr_flag
was ignored on Windows, but now it actually makes the acquisitions interruptible.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Sam Gross <colesbury@gmail.com>
ebf6d13
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Merged, thanks for the review@colesbury. |
Uh oh!
There was an error while loading.Please reload this page.
PyMutex is a fast and portable lock currently only used internally by Python. This change modifies
PyThread_allocate_lock
to reuse PyMutex.