We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e421141 commit 580e7b2Copy full SHA for 580e7b2
snapsave/snapsave.py
@@ -1,5 +1,5 @@
1
from __future__ import annotations
2
-from asyncio.tasks import ensure_future
+from asyncio.tasks import ensure_future, gather
3
from io import BufferedWriter, BytesIO
4
from ast import literal_eval
5
from typing import Any, Literal, Optional, Union
@@ -147,6 +147,7 @@ async def download(
147
await out.on_open(self, request)
148
async for i in request.aiter_bytes(chunk_size):
149
tasks.append(ensure_future(out.on_progress(i)))
150
+ await gather(*tasks)
151
await out.on_finish(self, request)
152
else:
153
0 commit comments