This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients Assaf Dayan, asvetlov, yselivanov
Date 2019-04-19.08:42:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555663329.18.0.755294868292.issue36295@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-04-19 08:42:09asvetlovsetrecipients: + asvetlov, yselivanov, Assaf Dayan
2019-04-19 08:42:09asvetlovsetmessageid: <1555663329.18.0.755294868292.issue36295@roundup.psfhosted.org>
2019-04-19 08:42:09asvetlovlinkissue36295 messages
2019-04-19 08:42:09asvetlovcreate