[New-bugs-announce] [issue42783] asyncio.sleep(0) idiom is not documented

Simon Willison report at bugs.python.org
Tue Dec 29 14:40:26 EST 2020


New submission from Simon Willison <swillison at gmail.com>:

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.

----------
assignee: docs at python
components: Documentation, asyncio
messages: 384025
nosy: asvetlov, docs at python, simonw, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.sleep(0) idiom is not documented
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42783>
_______________________________________


More information about the New-bugs-announce mailing list