Issue #27041: asyncio: Add loop.create_future method

This commit is contained in:
Yury Selivanov 2016-05-16 15:38:39 -04:00
parent 7ed7ce6ee7
commit 7661db6228
14 changed files with 55 additions and 39 deletions

View file

@ -366,7 +366,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
def _make_subprocess_transport(self, protocol, args, shell,
stdin, stdout, stderr, bufsize,
extra=None, **kwargs):
waiter = futures.Future(loop=self)
waiter = self.create_future()
transp = _WindowsSubprocessTransport(self, protocol, args, shell,
stdin, stdout, stderr, bufsize,
waiter=waiter, extra=extra,
@ -417,7 +417,7 @@ class IocpProactor:
return tmp
def _result(self, value):
fut = futures.Future(loop=self._loop)
fut = self._loop.create_future()
fut.set_result(value)
return fut