STINNER Victor <victor.stin...@gmail.com> added the comment:

> Why do you think monotonic time is needed for the Queue module?

The duration of a timeout of N seconds should be N seconds even if the system 
clock is updated (e.g. a daylight saving time (DST) change).

This feature is checked by an unit test in the patch attached to the isuse 
#14428 (implementation of the PEP 418):

+    def test_monotonic_settime(self):
+        t1 = time.monotonic()
+        realtime = time.clock_gettime(time.CLOCK_REALTIME)
+        # jump backward with an offset of 1 hour
+        time.clock_settime(time.CLOCK_REALTIME, realtime - 3600)
+        t2 = time.monotonic()
+        time.clock_settime(time.CLOCK_REALTIME, realtime)
+        # monotonic must not be affected by system clock updates
+        self.assertGreaterEqual(t2, t1)

You can imagine a similar patch for Queue timeout.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14222>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to