This is already supported with [`asyncio.wait_for()`]( https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for).
For example: `await asyncio.wait_for(asyncio.Event().wait(), timeout=60)`
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GZMTPNMQGGWJZR2VHKXIBQBXDOQNE25R/ Code of Conduct: http://python.org/psf/codeofconduct/