async enumeration - possible?

Ian Kelly ian.g.kelly at gmail.com
Wed Nov 30 09:40:32 EST 2016


On Wed, Nov 30, 2016 at 2:28 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> "Frank Millman" <frank at chagford.com>:
>
>> "Marko Rauhamaa"  wrote in message news:87d1hd4d5k.fsf at elektro.pacujo.net...
>>>   I don't think bulk iteration in asynchronous programming is ever that
>>>   great of an idea. You want to be prepared for more than one possible
>>>   stimulus in any given state. IOW, a state machine matrix might be
>>>   sparse but it is never diagonal.
>>
>> [...]
>>
>> I use 'bulk iteration' a lot in my app. It is a client/server
>> multi-user business/accounting app.
>>
>> If a user wants to view the contents of a large table, or I want to
>> print statements for a lot of customers, I can request the data and
>> process it as it arrives, without blocking the other users.
>
> 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.



More information about the Python-list mailing list