Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-141004: Document missing PyThread* APIs#141810
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ZeroIntensity commented Nov 20, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
ZeroIntensity commented Nov 20, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@colesbury, if you have time, I'd really appreciate your expertise here (especially on the |
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.
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.
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.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner left a comment
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.
LGTM
| If *intr_flag* is ``1``, acquiring the lock may be interrupted by a signal, | ||
| in which case this function returns :c:enumerator:`PY_LOCK_INTR`. Upon | ||
| interruption, it's generally expected that the caller makes a call to | ||
| :c:func:`Py_MakePendingCalls` to propagate an exception to Python code. |
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.
PyErr_CheckSignals() may be more appropriate than Py_MakePendingCalls(), no? Currently, it seems like Py_MakePendingCalls() is preferred.
Py_MakePendingCalls() is a superset of PyErr_CheckSignals(), so I'm fine with it.
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 we should use Py_MakePendingCalls, especially considering we use it ourselves in _thread.lock.
a89ee4b into python:mainUh oh!
There was an error while loading. Please reload this page.
Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
(cherry picked from commit a89ee4b) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
GH-141954 is a backport of this pull request to the 3.14 branch. |
(cherry picked from commit a89ee4b) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
GH-141955 is a backport of this pull request to the 3.13 branch. |
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
📚 Documentation preview 📚: https://cpython-previews--141810.org.readthedocs.build/en/141810/c-api/init.html#legacy-locking-apis