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 simonw
Recipients asvetlov, docs@python, simonw, yselivanov
Date 2020-12-29.19:40:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609270826.19.0.331548885122.issue42783@roundup.psfhosted.org>
In-reply-to
Content
asyncio.sleep(0) is the recommended idiom for co-operatively yielding control of the event loop to another task: https://github.com/python/asyncio/issues/284 and https://til.simonwillison.net/python/yielding-in-asyncio

This isn't currently explained in the documentation.
History
Date User Action Args
2020-12-29 19:40:26simonwsetrecipients: + simonw, asvetlov, docs@python, yselivanov
2020-12-29 19:40:26simonwsetmessageid: <1609270826.19.0.331548885122.issue42783@roundup.psfhosted.org>
2020-12-29 19:40:26simonwlinkissue42783 messages
2020-12-29 19:40:26simonwcreate