[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-10-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1ee0f94d16f150356a4b9b0a39d44ba1d2d5b9fc by Victor Stinner in branch 'main': bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28662) https://github.com/python/cpython/commit/1ee0f94d16f150356a4b9b0a39d44ba1d2d5b9fc --

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-10-01 Thread Mike Crowe
Mike Crowe added the comment: vstinner wrote: > The glibc 2.30 adds pthread_cond_clockwait() which could be used to use > CLOCK_MONOTONIC. But if pthread_cond_clockwait() is available (glibc > 2.30 or newer), it expects that pthread_condattr_setclock() is also > available. So I'm not sure tha

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: On Unix, PyCOND_TIMEDWAIT() is implemented with pthread_cond_timedwait(). If pthread_condattr_setclock() is available, it uses CLOCK_MONOTONIC. Otherwise, it uses CLOCK_REALTIME. The glibc 2.30 adds pthread_cond_clockwait() which could be used to use CLOCK_

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27027 pull_request: https://github.com/python/cpython/pull/28662 ___ Python tracker ___ __

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset b34dd58fee707b8044beaf878962a6fa12b304dc by Victor Stinner in branch 'main': bpo-41710: Document _PyTime_t API in pytime.h (GH-28647) https://github.com/python/cpython/commit/b34dd58fee707b8044beaf878962a6fa12b304dc -- ___

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27015 pull_request: https://github.com/python/cpython/pull/28647 ___ Python tracker ___ __

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 37b8294d6295ca12553fd7c98778be71d24f4b24 by Victor Stinner in branch 'main': bpo-41710: PyThread_acquire_lock_timed() clamps the timout (GH-28643) https://github.com/python/cpython/commit/37b8294d6295ca12553fd7c98778be71d24f4b24 -- __

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0231b6da45b610d33ee4e99bf190e31488d6ab26 by Victor Stinner in branch 'main': bpo-41710: Fix building pytime.c on Windows (GH-28644) https://github.com/python/cpython/commit/0231b6da45b610d33ee4e99bf190e31488d6ab26 -- _

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27012 pull_request: https://github.com/python/cpython/pull/28644 ___ Python tracker ___ __

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27011 pull_request: https://github.com/python/cpython/pull/28643 ___ Python tracker ___ __

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset d62d925823b005c33b432e527562b573a3a89635 by Victor Stinner in branch 'main': bpo-41710: Add pytime_add() and pytime_mul() (GH-28642) https://github.com/python/cpython/commit/d62d925823b005c33b432e527562b573a3a89635 --

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27010 pull_request: https://github.com/python/cpython/pull/28642 ___ Python tracker ___ __

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 09796f2f142fdb1214f34a3ca917959ecb32a88b by Victor Stinner in branch 'main': bpo-41710: Add _PyTime_AsTimespec_clamp() (GH-28629) https://github.com/python/cpython/commit/09796f2f142fdb1214f34a3ca917959ecb32a88b -- ___

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26999 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28629 ___ Python tracker ___ _

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-13 Thread STINNER Victor
Change by STINNER Victor : -- title: Timeout is affected by jumps in system time -> acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC) ___ Python tracker