On 08/22/2016 03:18 AM, Alexander Berntsen wrote:
> On 21/08/16 00:18, Zac Medico wrote:
>> This emulates the
>> asyncio.AbstractEventLoop.run_until_complete(future) interface
> What's that, and why are we emulating it instead of just using it?

We will be able to use it with python 3.4 and later, but not with older
versions of python. Also, we have some more work to do first:

* Migrate all internal use of the EventLoop.iteration method to the new
run_until_complete(future) method, and remove the EventLoop.iteration
method (or make it private as long as it's needed to implement
run_until_complete for older python versions).

* Implement all EventLoop methods using asyncio.AbstractEventLoop
methods (but keep existing implementations for use with older python).

>> which will make it possible to reduce latency in situations where it
>> is desirable for a loop to exit at the earliest opportunity.
> It makes it possible -- okay. But does it? I'm reluctant to change
> things willy nilly, and add SLOCs, without a tangible benefit.

Having a migration path to asyncio is the most tangible benefit, since
it allows us to rely on a standard library instead of our own internal
event loop implementation. I mention latency since it's a clear
advantage of the run_until_complete API (at least in theory).

Reply via email to