That switch means other things can now occur. You have to know that when
you yield your coroutine other things may mutate state, which means you now
need to check that no previous assumptions have become invalid. Event loops
typically being single-threaded means you don't need to lock and worry
about race conditions, but it doesn't let you off the hook to not assume
something mutated when you weren't looking. Plus execution order is now
non-deterministic which is something else you need to worry about.

To be upfront, as a steering council member I wouldn't vote to approve a
PEP that proposed this change.

On Fri, Jun 12, 2020 at 2:27 PM J. Pic <j...@yourlabs.org> wrote:

> I mean, if it pauses because of some blocking IO and switches to another
> coroutine, that's just a BIG win ... I have hard times trying to figure how
> that signal could be useful to me as a developer. On the other hand, I have
> to (await test()).bar ...
>
_______________________________________________
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/7KRDXPZGXJJLQX5LMZ7FGAIONDW4VZRB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to