Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventLoop: add run_until_complete method (bug 591760) #44

Merged
merged 1 commit into from Aug 23, 2016

Conversation

zmedico
Copy link
Member

@zmedico zmedico commented Aug 20, 2016

EventLoop: add run_until_complete method (bug 591760)

This emulates the asyncio.AbstractEventLoop.run_until_complete(future)
interface, which will make it possible to reduce latency in situations
where it is desirable for a loop to exit at the earliest opportunity.

The most tangible benefit of this change is that it provides a
migration path to asyncio, which will allow us to rely on a standard
library instead of our own internal event loop implementation.

In order to migrate to asyncio, more work is planned:

  • 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).

X-Gentoo-bug: 591760
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591760

@zmedico zmedico force-pushed the bug_591760 branch 3 times, most recently from 283798c to d037514 Compare August 22, 2016 16:33
This emulates the asyncio.AbstractEventLoop.run_until_complete(future)
interface, which will make it possible to reduce latency in situations
where it is desirable for a loop to exit at the earliest opportunity.

The most tangible benefit of this change is that it provides a
migration path to asyncio, which will allow us to rely on a standard
library instead of our own internal event loop implementation.

In order to migrate to asyncio, more work is planned:

* 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).

X-Gentoo-bug: 591760
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591760
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
@gentoo-bot gentoo-bot merged commit 995f0f9 into gentoo:master Aug 23, 2016
@zmedico zmedico deleted the bug_591760 branch December 18, 2016 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants