mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +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
|
@ -128,7 +128,7 @@ class Queue:
|
|||
This method is a coroutine.
|
||||
"""
|
||||
while self.full():
|
||||
putter = futures.Future(loop=self._loop)
|
||||
putter = self._loop.create_future()
|
||||
self._putters.append(putter)
|
||||
try:
|
||||
yield from putter
|
||||
|
@ -162,7 +162,7 @@ class Queue:
|
|||
This method is a coroutine.
|
||||
"""
|
||||
while self.empty():
|
||||
getter = futures.Future(loop=self._loop)
|
||||
getter = self._loop.create_future()
|
||||
self._getters.append(getter)
|
||||
try:
|
||||
yield from getter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue