diff options
author | Zac Medico <zmedico@gentoo.org> | 2018-04-15 23:13:09 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2018-04-15 23:17:52 -0700 |
commit | 9ebbe247f9c92bc042a67d24cadb314f4f0a5319 (patch) | |
tree | 24f1209c592790214862978434a2eac8248ce12b /pym/portage/util/_eventloop/EventLoop.py | |
parent | Implement AbstractEventLoop.connect_read_pipe (bug 649588) (diff) | |
download | portage-9ebbe247f9c92bc042a67d24cadb314f4f0a5319.tar.gz portage-9ebbe247f9c92bc042a67d24cadb314f4f0a5319.tar.bz2 portage-9ebbe247f9c92bc042a67d24cadb314f4f0a5319.zip |
Eventloop.run_until_complete: call asyncio.ensure_future
This eliminates the need for _PortageEventLoop to override the
Eventloop.run_until_complete method.
Diffstat (limited to 'pym/portage/util/_eventloop/EventLoop.py')
-rw-r--r-- | pym/portage/util/_eventloop/EventLoop.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py index 35d0a35ba..0024d162c 100644 --- a/pym/portage/util/_eventloop/EventLoop.py +++ b/pym/portage/util/_eventloop/EventLoop.py @@ -25,6 +25,7 @@ except ImportError: import portage portage.proxy.lazyimport.lazyimport(globals(), + 'portage.util.futures:asyncio', 'portage.util.futures.futures:Future', 'portage.util.futures.executor.fork:ForkExecutor', 'portage.util.futures.unix_events:_PortageEventLoop,_PortageChildWatcher', @@ -781,6 +782,7 @@ class EventLoop(object): @return: the Future's result @raise: the Future's exception """ + future = asyncio.ensure_future(future, loop=self._asyncio_wrapper) while not future.done(): self.iteration() |