-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
gh-103417: Fix: infinite run (timefunc in scheduler example) #111497
Conversation
@serhiy-storchaka Is the proper fix to revert the change from .time to .monotonic (and not worry about DST changes)? If so, this looks ready to commit. Or should the example be fixed to run with time.monotonic? |
The example was initially written for I am not sure that changing the default timer was correct. It is a breaking change, and it was especially bad in intermediate versions, when the timer was depended on platform. But it is too later to change it back. DST changes do not affect this. The |
Thanks @mauricelambert for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Arguments to enterabs() are specified as Unix time. If the scheduler use the time.monotonic timer, the code will take decades to complete. (cherry picked from commit cb287d3) Co-authored-by: mauricelambert <50479118+mauricelambert@users.noreply.github.com>
GH-115908 is a backport of this pull request to the 3.12 branch. |
Arguments to enterabs() are specified as Unix time. If the scheduler use the time.monotonic timer, the code will take decades to complete. (cherry picked from commit cb287d3) Co-authored-by: mauricelambert <50479118+mauricelambert@users.noreply.github.com>
GH-115909 is a backport of this pull request to the 3.11 branch. |
Arguments to enterabs() are specified as Unix time. If the scheduler use the time.monotonic timer, the code will take decades to complete. (cherry picked from commit cb287d3) Co-authored-by: mauricelambert <50479118+mauricelambert@users.noreply.github.com>
Arguments to enterabs() are specified as Unix time. If the scheduler use the time.monotonic timer, the code will take decades to complete. (cherry picked from commit cb287d3) Co-authored-by: mauricelambert <50479118+mauricelambert@users.noreply.github.com>
Arguments to enterabs() are specified as Unix time. If the scheduler use the time.monotonic timer, the code will take decades to complete.
Arguments to enterabs() are specified as Unix time. If the scheduler use the time.monotonic timer, the code will take decades to complete.
Infinite run - sched documentation
I modify the
timefunc
function in the scheduler example because example was write fortime.time
and not fortime.monotonic
. This mistake cause an infinite run.📚 Documentation preview 📚: https://cpython-previews--111497.org.readthedocs.build/