]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671)
authorVictor Stinner <vstinner@python.org>
Fri, 1 Oct 2021 16:22:49 +0000 (18:22 +0200)
committerGitHub <noreply@github.com>
Fri, 1 Oct 2021 16:22:49 +0000 (18:22 +0200)
commit6df8c327532627d6a99991993c52e8e4a9b34968
tree741232ad7040fe93e59788dcc2a271656e8024f4
parent282992b36f9fe27183037051f3b37210884600af
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (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.
Misc/NEWS.d/next/Library/2021-09-30-23-00-18.bpo-41710.svuloZ.rst [new file with mode: 0644]
Python/thread_pthread.h
configure
configure.ac
pyconfig.h.in