New submission from Jonas Norling :
The timeout for threading.Lock, threading.Condition, etc, is not using a
monotonic clock — it is affected if the system time (realtime clock) is set.
The attached program can be used to show the problem. It is expected to print
"Took 2.000 s"
Jonas Norling added the comment:
sys.thread_info = sys.thread_info(name='pthread', lock='semaphore',
version='NPTL 2.31') on my system. Looking at the source I think the semaphore
implementation will be used on all modern Linux systems.
In my tests it works as
Jonas Norling added the comment:
@bar.harel: I didn't find a PR, so I'd like to encourage you to submit one :-)
I stumbled onto this bug when the scheduler would cancel the wrong event for me
(Python 3.7, 3.8). Raymond's suggestion 1 sounds reasonable; it would be very
un