Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use time.monotonic() for calculating timeouts. #136

Merged
merged 4 commits into from Feb 16, 2022

Commits on Feb 16, 2022

  1. Use time.monotonic() for calculating timeouts.

    time.time() is affected by system clock updates (for example, by the NTP
    daemon). This can cause timeouts to be unpredictable if clock jumps forwards or
    backwards while code is waiting to acquire a lock.
    
    time.monotonic() returns a time value that is not affected by clock updates and
    does not have this issue. In Python 3.5 and later it is available on all systems[1].
    
    [1] https://docs.python.org/3/library/time.html#time.monotonic
    avian2 committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    c7339ab View commit details
    Browse the repository at this point in the history
  2. Add change log entry.

    avian2 committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    e242a04 View commit details
    Browse the repository at this point in the history
  3. PR feedback

    gaborbernat committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    9b40e50 View commit details
    Browse the repository at this point in the history
  4. Fix changelog

    gaborbernat committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    aa230b9 View commit details
    Browse the repository at this point in the history