mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
Issue #27041: asyncio: Add loop.create_future method
This commit is contained in:
parent
7ed7ce6ee7
commit
7661db6228
14 changed files with 55 additions and 39 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue