asyncio.wait(..) now requires Tasks
This commit is contained in:
parent
a1a459c13e
commit
cf2e69a9e2
1 changed files with 3 additions and 2 deletions
|
@ -287,9 +287,10 @@ class Server(IServer):
|
|||
|
||||
if not self._process_queue:
|
||||
async with self._read_lwork:
|
||||
read_aw = self._read_line(PING_TIMEOUT)
|
||||
read_aw = asyncio.create_task(self._read_line(PING_TIMEOUT))
|
||||
wait_aw = asyncio.create_task(self._wait_for.wait())
|
||||
dones, notdones = await asyncio.wait(
|
||||
[read_aw, self._wait_for.wait()],
|
||||
[read_aw, wait_aw],
|
||||
return_when=asyncio.FIRST_COMPLETED
|
||||
)
|
||||
self._wait_for.clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue