[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-19 Thread STINNER Victor
STINNER Victor added the comment: > Yo, I had marked this as something I was going to review once > the python-dev discussion to complete. FWIW, I'm the maintainer > of the Queue module. And so, do you agree with the change? -- ___ Python tracker

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yo, I had marked this as something I was going to review once the python-dev discussion to complete. FWIW, I'm the maintainer of the Queue module. -- ___ Python tracker _

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset d97ae725814c by Victor Stinner in branch 'default': Issue #14222: Use the new time.steady() function instead of time.time() for http://hg.python.org/cpython/rev/d97ae725814c -- nosy: +python-dev ___ Pyth

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-14 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-14 Thread Charles-François Natali
Charles-François Natali added the comment: Random thoughts: - as noted by Antoine, it probably affects a lot of code throughout the standard library - sem_timedwait() (used by lock.acquire() on POSIX) is affected (the implementation using a condition variable could use pthread_condattr_setclock(

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-14 Thread Matt Joiner
Changes by Matt Joiner : -- nosy: +anacrolix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-13 Thread STINNER Victor
STINNER Victor added the comment: threading_monotonic.patch: similar patch for the threading module. Drawback of these patchs: they now call time.monotonic() when the module is loaded (another useless syscall?). -- Added file: http://bugs.python.org/file24835/threading_monotonic.patch

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-13 Thread STINNER Victor
STINNER Victor added the comment: queue_monotonic.patch: simple patch using time.monotonic(), with a fallback to time.time() if monotonic failed or is not available. -- keywords: +patch Added file: http://bugs.python.org/file24834/queue_monotonic.patch

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-07 Thread STINNER Victor
STINNER Victor 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 b

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, in 3.3 we could use clock_gettime(CLOCK_MONOTONIC) where available. That said, this is not specific to Queue.get() and will probably happen with many similar functions taking a timeout parameter. -- nosy: +haypo, neologix, pitrou ___

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-07 Thread Tasslehoff Kjappfot
New submission from Tasslehoff Kjappfot : Queue.get([block[, timeout]]) uses time.time() for calculations of the timeout. If someone changes the system time this breaks. If a timeout of 1 second is set and someone (on a unix system) uses date to set the time 1 hour back, Queue.get will use 1 h