Sitelet https://web.archive.org/web/20220203074616/https://github.com/python/cpython/pull/28683
Skip to content
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

[3.9] bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671) #28683

Merged
merged 1 commit into from Oct 1, 2021

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 1, 2021 •

On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.

configure now checks if the sem_clockwait() function is available.
(cherry picked from commit 6df8c32)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue41710

…GH-28671)

On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.

configure now checks if the sem_clockwait() function is available.
(cherry picked from commit 6df8c32)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Oct 1, 2021

@vstinner: Status check is done, and it's a success ✅ .

Copy link
Member

@vstinner vstinner left a comment

LGTM, good bot.

@vstinner vstinner merged commit 0e1aeab into python:3.9 Oct 1, 2021
13 checks passed
@miss-islington miss-islington deleted the backport-6df8c32-3.9 branch Oct 1, 2021
@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Oct 1, 2021

@vstinner: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants