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

PJ Eby pje at telecommunity.com
Thu Apr 5 18:41:46 CEST 2012


On Wed, Apr 4, 2012 at 11:41 PM, Cameron Simpson <cs at zip.com.au> wrote:

> On 04Apr2012 22:23, PJ Eby <pje at telecommunity.com> wrote:
> | On Apr 4, 2012 7:28 PM, "Victor Stinner" <victor.stinner at gmail.com>
> wrote:
> | > 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.
>
> It was pointed out (by Nick Coglan I think?) that if the system clock
> stepped backwards then a timeout would be extended by at least that
> long. For example, code that waited (by polling the synthetic clock)
> for 1s could easily wait an hour if the system clock stepped back that
> far. Probaby undesirable.
>

Steven D'Aprano's algorithm doesn't do that.  If the system clock steps
backwards, it still stepped forward by a specified minimum delta.  The
amount of time that a timeout was extended would be a function of the
polling frequency, not the presence of absence of backward steps in the
underlying clock.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120405/36362f26/attachment.html>


More information about the Python-Dev mailing list