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 9ff73dc commit be9629dCopy full SHA for be9629d
1 file changed
Doc/howto/a-conceptual-overview-of-asyncio.rst
@@ -450,14 +450,14 @@ Note this is also of true of ``asyncio.sleep``.
450
def __await__(self):
451
yield
452
453
- async def _sleep_watcher(future: asyncio.Future, time_to_wake: float):
+ async def _sleep_watcher(future, time_to_wake):
454
while True:
455
if time.time() >= time_to_wake:
456
- # This marks the future as done.
457
- future.set_result(None)
458
- break
+ # This marks the future as done.
+ future.set_result(None)
+ break
459
else:
460
- await YieldToEventLoop()
+ await YieldToEventLoop()
461
462
Here is the full program's output:
463
0 commit comments