Uh oh!
There was an error while loading. Please reload this page.
gh-141004: Document missing PyThread* APIs - #141810
Conversation
@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>
| 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.
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.
I think we should use Py_MakePendingCalls, especially considering we use it ourselves in _thread.lock.
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