[issue43736] asyncio create_task() odd behavior
Andrew Svetlov
report at bugs.python.org
Tue Apr 6 04:45:51 EDT 2021
Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:
1. Please consider `await` as a 'yield point': the point where the current task may be suspended to get other tasks a chance to be executed.
It can be any `await`, not necessarily waiting for a task. Just a point where asyncio event loop gives a chance to roll an iteration.
Note: no suspension happens if the argument is 'ready' already.
2. If we design asyncio from scratch we can consider the separation of task creation and start. Unfortunately, the ship has sailed many years ago. The behavior cannot be changed without breaking virtually every asyncio program, sorry.
----------
resolution: remind -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43736>
_______________________________________
More information about the Python-bugs-list
mailing list