Skip to content

Commit 9514444

Browse files
author
Konstantin Vlasov
committed
Applied suggestions from PR comments
* Fixed sorting of imports * Fixed formatting in the NEWS entry * Reworded the explanatory comment
1 parent 898c451 commit 9514444

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Lib/asyncio/base_events.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
import errno
2020
import heapq
2121
import itertools
22+
import math
2223
import os
2324
import socket
2425
import stat
2526
import subprocess
27+
import sys
2628
import threading
2729
import time
2830
import traceback
29-
import sys
3031
import warnings
3132
import weakref
32-
import math
3333

3434
try:
3535
import ssl
@@ -2024,8 +2024,8 @@ def _run_once(self):
20242024

20252025
# Handle 'later' callbacks that are ready.
20262026
now = self.time()
2027-
# If clock resolution is too small, make sure end_time has the minimal
2028-
# possible increment
2027+
# Ensure that `end_time` is strictly increasing
2028+
# when the clock resolution is too small.
20292029
end_time = now + max(self._clock_resolution, math.ulp(now))
20302030
while self._scheduled:
20312031
handle = self._scheduled[0]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Make sure asyncio.BaseEventLoop triggers scheduled events on time when clock
2-
resolution is too small.
1+
:mod:`asyncio`: Make sure that :class:`~asyncio.BaseEventLoop` triggers
2+
scheduled events on time when the clock resolution becomes too small.

0 commit comments

Comments
 (0)