Hello,

This must be FAQ, but: 1) google can't get search results right; 2) people 
gotta ask that again, again, and again, so here it goes.

Why Task objects in asyncio are not callable? Just studying asyncio, it 
becomes clear that it's core is loop which runs callbacks from a queue. So, 
how do we integrate coroutines via generators into that? Obvious, we add an 
adapter object which translates call protocol into generator protocol, 
voila.

Now, why that undocumented _step() method, worse, why is it scheduled to be 
called in *Task constructor*? How just creating a task object makes it 
scheduled? Why are users denied ability to schedule Tasks as they see fit? 
In general, why all this tight coupledness between event loop and Tasks?

Where this comes from: I'm looking for the simplest possible way to 
schedule a coroutine to be run. run_until_complete(), asyncio.wait() - too 
complicated and bloated ways for such a simple task (and that's what 
asyncio docs give in examples).

Thanks.

Reply via email to