[issue35747] Python threading event wait influenced by date change

2021-10-01 Thread STINNER Victor
Change by STINNER Victor : -- superseder: Use the monotonic clock for thread conditions on POSIX platforms -> NewGIL should use CLOCK_MONOTONIC if possible. ___ Python tracker ___

[issue35747] Python threading event wait influenced by date change

2019-01-17 Thread STINNER Victor
STINNER Victor added the comment: > looks like duplicate of bugs.python.org/issue23428 Yes. I close this issue as a duplicate of bpo-23428. Let's discuss the bug there! -- stage: -> resolved status: open -> closed superseder: -> Use the monotonic clock for thread conditions on POS

[issue35747] Python threading event wait influenced by date change

2019-01-17 Thread STINNER Victor
STINNER Victor added the comment: Oops, I posted the following comment on the wrong issue... I wanted to post the following comment on this issue! I'm sorrry, I read the issue too quickly and misunderstood it. I guess that it's a duplicate of bpo-23428: "Use the monotonic clock for thread co

[issue35747] Python threading event wait influenced by date change

2019-01-16 Thread ido k
ido k added the comment: thanks @pablogsal. looks like duplicate of bugs.python.org/issue23428 It seems like i cant trust the threading wait function and need to use busy waiting. -- resolution: -> duplicate ___ Python tracker

[issue35747] Python threading event wait influenced by date change

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think this is becase at the end, the threading code calls sem_timedwait(thelock, &ts) where &ts is the timespect structure. The manpage of sem_timedwait says: ... The timeout shall expire when the absolute time specified by abs_timeout passes, as

[issue35747] Python threading event wait influenced by date change

2019-01-15 Thread ido k
ido k added the comment: thanks for the comment please look at the code. i use wait on event for 60 seconds. the wait timed out in less than 60 seconds... why this is not a bug? -- ___ Python tracker

[issue35747] Python threading event wait influenced by date change

2019-01-15 Thread STINNER Victor
STINNER Victor added the comment: Python 3 uses a monotonic clock to implement timeouts, such clock is not affected by system clock changes *on purpose*. See time.monotonic() and PEP 418: https://docs.python.org/dev/library/time.html#time.monotonic https://www.python.org/dev/peps/pep-0418/ Re

[issue35747] Python threading event wait influenced by date change

2019-01-15 Thread ido k
New submission from ido k : Happen on ubuntu Opening two threads - one thread alternate system date The seconds waits for 60 seconds. joining both threads. The execution should take at least 60 seconds. Takes less then 15 seconds. Any work around? -- components: Library (Lib) files: