asyncio.get_event_loop().run_until_complete(asyncio.sleep(1)) 是什么意思

what does asyncio.get_event_loop().run_until_complete(asyncio.sleep(1)) mean

下面的代码有什么意义吗?如果可以,使用它的场景是什么?睡眠时间不同有什么区别?

...
while True:
    asyncio.get_event_loop().run_until_complete(asyncio.sleep(1))
...

复制我认为回答了我的问题的一条评论:

run_until_complete() runs not only the given task, but also any other runnable tasks, until the given task completes. The above loop could have a meaning if some tasks were scheduled using asyncio.get_event_loop().create_task(xxx) prior to the loop's execution. In that case the while loop as shown might be designed not to run sleep() (which would indeed be useless), but to give the event loop a time slot of 1s to run, and then (presumably in the loop) do some non-asyncio checks.