STINNER Victor <vstin...@python.org> added the comment:
With sem_clockwait(CLOCK_MONOTONIC) on Fedora 34 (glibc-2.33-20.fc34.x86_64, Linux kernel 5.13.19-200.fc34.x86_64), time_test.py now works as expected: $ sudo ./python time_test.py Took 2.000 s Took 2.000 s Took 2.000 s Took 2.000 s Took 2.000 s Took 2.000 s (...) ---------- title: acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC) -> threading.Lock.acquire(timeout) should use sem_clockwait(CLOCK_MONOTONIC) versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41710> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com