Regardless of a mechanism to counting time, and etc... Maybe a plain and simple adition to asincio would be a context-switching call that does what `asyncio.sleep(0)` does today?
It would feel better to write something like `await asyncio.switch()` than an arbitrary `sleep`. On Fri, 14 Jun 2019 at 10:27, Nikita Melentev <[email protected]> wrote: > Fortunately, asyncio provide this good universal default: 100ms, when > WARING appears. Nested loops can be solved with context manager, which will > share `last_context_switch_time` between loops. But main thing here is that > this is strictly optional, and when someone will use this thing he will > know what it is and why he need this. > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/UT5LEWS4XX5IJ64AMMYKJVG2BNYZXYQY/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/4ZTLXBAQPFYQNITNB3RLRCW5D2QXKGBI/ Code of Conduct: http://python.org/psf/codeofconduct/
