[issue14222] Using time.time() in Queue.get breaks when system time is changed
STINNER Victor
report at bugs.python.org
Thu Mar 8 01:38:57 CET 2012
STINNER Victor <victor.stinner at gmail.com> added the comment:
> Well, in 3.3 we could use clock_gettime(CLOCK_MONOTONIC) where available.
It's better to use time.monotonic().
> That said, this is not specific to Queue.get() and will probably happen with many similar functions taking a timeout parameter.
Yep, it may be used for lock.acquire(timeout=timeout) for example. It
would help to have a portable monotonic clock API in C.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14222>
_______________________________________
More information about the Python-bugs-list
mailing list