Re: [Python-Dev] PEP 418 is too divisive and confusing and should be postponed

2012年4月05日 09:50:37 -0700

On Thu, Apr 5, 2012 at 6:34 AM, Victor Stinner <[email protected]>wrote:
> 2012年4月5日 PJ Eby <[email protected]>:
> >> More details why it's hard to define such function and why I dropped
> >> it from the PEP.
> >>
> >> If someone wants to propose again such function ("monotonic or
> >> fallback to system" clock), two issues should be solved:
> >>
> >> - name of the function
> >> - description of the function
> >
> > Maybe I missed it, but did anyone ever give a reason why the fallback
> > couldn't be to Steven D'Aprano's monotonic wrapper algorithm over the
> system
> > clock? (Given a suitable minimum delta.) That function appeared to me
> to
> > provide a sufficiently monotonic clock for timeout purposes, if nothing
> > else.
>
>
> Did you read the following section of the PEP?
>
> http://www.python.org/dev/peps/pep-0418/#working-around-operating-system-bugs
>
> Did I miss something? If yes, could you write a patch for the PEP please?
>
What's missing is that if you're using a monotonic clock for timeouts, then
a monotonically-adjusted system clock can do that, subject to the polling
frequency -- it does not break just because the system clock is set
backwards; it simply loses time proportional to the frequency with which it
is polled.
For timeout purposes in a single process, such a clock is useful. It just
isn't suitable for benchmarks, or for interprocess coordination.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to