Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-74953: PyThread_acquire_lock_timed() recomputes timeout#93946
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
macOS job failed with:
I don't know if it's related to the PR. |
PR rebased on main to get fixes for unrelated compiler warnings. |
The mutex with conditional variable implementation of lock nowrecomputes the timeout if acquire(timeout=timeout) is interrupted bya signal.
I'm no longer convinced that this change is needed:
Locks used in Python call PyThread_acquire_lock_timed() with intr_flag=1: if a function returns EINTR, it returns immediately, the caller checks for signals, and then calls again the function to try again to acquire to lock with a re-computed timeout. I close my PR. But I wrote PR#94056 to clean-up the code. |
The mutex with conditional variable implementation of lock now
recomputes the timeout if acquire(timeout=timeout) is interrupted by
a signal.