Message340530
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 |
|
Date |
User |
Action |
Args |
2019-04-19 08:42:09 | asvetlov | set | recipients:
+ asvetlov, yselivanov, Assaf Dayan |
2019-04-19 08:42:09 | asvetlov | set | messageid: <1555663329.18.0.755294868292.issue36295@roundup.psfhosted.org> |
2019-04-19 08:42:09 | asvetlov | link | issue36295 messages |
2019-04-19 08:42:09 | asvetlov | create | |
|