[Python-ideas] The async API of the future: yield-from

Steve Dower Steve.Dower at microsoft.com
Tue Oct 16 19:17:34 CEST 2012

> What if the event poll was just inside a task, not requiring any loop in the scheduler, or even knowledge by the scheduler, in any way?

I agree, every task can handle all the asynchrony within it and just expose a single 'completed' notification (a Future or similar) to its caller. This is the portable solution - it is going to be less than optimal in some cases, but is much more composable and extensible. As a Python developer, I like the model of "I call this function normally and it gives me a Future to let me know when it's done but I don't really know how it's doing it." (Incidentally, I like it as a C# and C++ developer too.) 

More information about the Python-ideas mailing list