]> granicus.if.org Git - python/commitdiff
Issue #14222: Use the new time.steady() function instead of time.time() for
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 15 Mar 2012 00:22:16 +0000 (01:22 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 15 Mar 2012 00:22:16 +0000 (01:22 +0100)
timeout in queue and threading modules to not be affected of system time
update.

Lib/queue.py
Lib/threading.py
Misc/NEWS

index ba608c5a4c242b04431a17ab24479b117d6cd006..1dc72c4bbe2daa3dc7c82b2fef057e1c43e82ad7 100644 (file)
@@ -6,7 +6,7 @@ except ImportError:
     import dummy_threading as threading
 from collections import deque
 from heapq import heappush, heappop
-from time import time
+from time import steady as time
 
 __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
 
index 441c7bd9032e5b2f65c4adda93b435e1ac4666c8..197dec4fb1cbc893f7a9c592944f8ecd875053b5 100644 (file)
@@ -3,7 +3,7 @@
 import sys as _sys
 import _thread
 
-from time import time as _time, sleep as _sleep
+from time import steady as _time, sleep as _sleep
 from traceback import format_exc as _format_exc
 from _weakrefset import WeakSet
 
index 6937a45b51494fc4816901703409afa7bcc4e945..cb1ec6ddd4d3201d7ae1e9d84e73ea61e5e2b61a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,10 @@ Core and Builtins
 Library
 -------
 
+- Issue #14222: Use the new time.steady() function instead of time.time() for
+  timeout in queue and threading modules to not be affected of system time
+  update.
+
 - Issue #13248: Remove lib2to3.pytree.Base.get_prefix/set_prefix.
 
 - Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash