Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Lib/asyncio/base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import sys
import warnings
import weakref
import math
Comment thread
picnixz marked this conversation as resolved.
Outdated

try:
import ssl
Expand Down Expand Up @@ -2022,7 +2023,10 @@ def _run_once(self):
event_list = None

# Handle 'later' callbacks that are ready.
end_time = self.time() + self._clock_resolution
now = self.time()
# If clock resolution is too small, make sure end_time has the minimal
# possible increment
Comment thread
picnixz marked this conversation as resolved.
Outdated
end_time = now + max(self._clock_resolution, math.ulp(now))
while self._scheduled:
handle = self._scheduled[0]
if handle._when >= end_time:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Make sure asyncio.BaseEventLoop triggers scheduled events on time when clock
resolution is too small.
Comment thread
picnixz marked this conversation as resolved.
Outdated
Loading