We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af944e7 commit 92fae2cCopy full SHA for 92fae2c
test/asynchronous/test_async_loop_unblocked.py
@@ -33,12 +33,13 @@ async def background_task():
33
last_run = None
34
try:
35
while True:
36
- if last_run:
+ if last_run is not None:
37
latencies.append(time.monotonic() - last_run)
38
last_run = time.monotonic()
39
await asyncio.sleep(0.1)
40
except asyncio.CancelledError:
41
- latencies.append(time.monotonic() - last_run)
42
+ latencies.append(time.monotonic() - last_run)
43
raise
44
45
t = asyncio.create_task(background_task())
0 commit comments