Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 675633334285
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e1ad31b63d63
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jul 28, 2020

  1. Copy the full SHA
    e1ad31b View commit details
Showing with 6 additions and 2 deletions.
  1. +6 −2 software/glasgow/support/task_queue.py
8 changes: 6 additions & 2 deletions software/glasgow/support/task_queue.py
Original file line number Diff line number Diff line change
@@ -59,7 +59,9 @@ async def wait_one(self):
pending task finishes. Equivalent to :meth:`poll` otherwise.
"""
if not self._done:
await asyncio.wait(self._live, return_when=asyncio.FIRST_COMPLETED)
done, _ = await asyncio.wait(self._live, return_when=asyncio.FIRST_COMPLETED)
for future in done:
future.result()
assert len(self._done) > 0
return await self.poll()

@@ -68,7 +70,9 @@ async def wait_all(self):
Await all tasks in the queue, if any.
"""
if self._live:
await asyncio.wait(self._live, return_when=asyncio.ALL_COMPLETED)
done, _ = await asyncio.wait(self._live, return_when=asyncio.ALL_COMPLETED)
for future in done:
future.result()
return await self.poll()

def __bool__(self):