Andrew Svetlov <andrew.svet...@gmail.com> added the comment:

In asyncio `await asyncio.sleep(0)` is for switching execution context from the 
current task to other code. 
There is no guarantee for finishing already running tasks before returning from 
`asyncio.sleep(0)` call etc.

Also, your code snippet has a logical error. It should not call regular 
`time.sleep(123)` from a coroutine but use `loop.run_in_executor()` for 
performing blocking calls

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36295>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to