Skip to content

[3.6] bpo-34819: Use a monotonic clock to compute timeouts in concurrent.futures (GH-9599) #9600

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

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 27, 2018

Use a monotonic clock to compute timeouts in :meth:Executor.map and :func:as_completed, in order to prevent timeouts from deviating when the system clock is adjusted.

This may not be sufficient on all systems. On POSIX for example, the actual waiting (e.g. in sem_timedwait) is specified to rely on the CLOCK_REALTIME clock.
(cherry picked from commit a94ee12)

Co-authored-by: orlnub123 [email protected]

https://bugs.python.org/issue34819

…tures (pythonGH-9599)

Use a monotonic clock to compute timeouts in :meth:`Executor.map` and :func:`as_completed`, in order to prevent timeouts from deviating when the system clock is adjusted.

This may not be sufficient on all systems. On POSIX for example, the actual waiting (e.g. in ``sem_timedwait``) is specified to rely on the CLOCK_REALTIME clock.
(cherry picked from commit a94ee12)

Co-authored-by: orlnub123 <[email protected]>
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@miss-islington
Copy link
Contributor Author

@orlnub123 and @pitrou: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 3a4aa6a into python:3.6 Sep 27, 2018
@miss-islington miss-islington deleted the backport-a94ee12-3.6 branch September 27, 2018 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants