[Python-ideas] yield from multiple iterables (was Re: The async API of the future: yield-from)
tismer at stackless.com
Mon Oct 15 10:24:53 CEST 2012
On 15.10.12 07:34, Greg Ewing wrote:
> Christian Tismer wrote:
>> My approach would be to first find out how async operations should
>> be modelled the best under the assumption that we have a coroutine
>> concept that works without headaches about yielding in and out from
>> something to whatnot.
> I think we already know that. People like Dijkstra and Hoare
> figured it all out decades ago.
> That's what my generator-oriented approach is based on --
> using standard techniques for managing concurrency.
Sure, the theory is clear and well-known.
Not so clear is which of the concepts to implement to
what detail, and things like the C10K problem still are a challenge
to solve efficiently for Python.
I think it is necessary to take these considerations into account
at least and to think about updating large sets of waiting
channels efficiently, using appropriate data structures.
>> After that is settled and gets consensus, then I would think about
>> bearable patterns to implement that using generators. And when we
>> know what we really need, maybe considering more suitable Syntax.
> Given that we don't want to use OS threads or greenlets,
> but we're happy to use generators, all that's left is to
> find bearable patterns for doing so.
Question: Is it already given that something like greenlets is out
of consideration? I did not find a final say on that (but I'm bad at
Is the whole discussion about what would be best, or just
"you can choose any implementation provided it's generators" ? :-)
cheers - Chris
Christian Tismer :^) <mailto:tismer at stackless.com>
Software Consulting : Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/
14482 Potsdam : PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776 fax +49 (30) 700143-0023
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
More information about the Python-ideas