just a little
This commit is contained in:
parent
2f9cc77b42
commit
f304dae207
1 changed files with 3 additions and 4 deletions
|
@ -160,11 +160,10 @@ impl Push {
|
||||||
self.bucket.clone(),
|
self.bucket.clone(),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
let fut = tokio::spawn({
|
uploads.push(tokio::spawn(async move {
|
||||||
let _permit = permits.acquire().await.unwrap();
|
let _permit = permits.acquire().await.unwrap();
|
||||||
async move { uploader.upload().await }
|
uploader.upload().await
|
||||||
});
|
}));
|
||||||
uploads.push(fut);
|
|
||||||
} else {
|
} else {
|
||||||
join_all(uploads)
|
join_all(uploads)
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue