[Python-ideas] Are there asynchronous generators?

Ron Adam ron3200 at gmail.com
Thu Jul 2 18:21:54 CEST 2015



On 07/02/2015 05:57 AM, Paul Moore wrote:
> So even though people can
> understand event-driven problems, they can't, without experience, see
> how async/await*addresses*  that problem.

Yes, I think there are some parts to it that are difficult to understand 
still.  That could be a documentation thing.

Consider a routine roughly organised like this:

       event_loop:
             item_loop1:
                    action1 <-- wait for event1
             item_loop2:
                    action2 <-- wait for event2
             other_things_loop:
                    ...
                    sleep    # continue event_loop


It's not clear to me how to write that with asyncio yet.  But I don't think 
I'm alone.

Cheers,
    Ron







More information about the Python-ideas mailing list