async enumeration - possible?

Marko Rauhamaa marko at pacujo.net
Wed Nov 30 10:28:56 EST 2016


Ian Kelly <ian.g.kelly at gmail.com>:

> On Wed, Nov 30, 2016 at 2:28 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> Each "await" in a program is a (quasi-)blocking state. In each state,
>> the program needs to be ready to process different input events.
>
> Well, that's why you can have multiple different coroutines awaiting
> at any given time.

At the very least, the programmer needs to actively consider
CancelledError for every "async" statement, even in the middle of an
"async for".


Marko



More information about the Python-list mailing list