Skip to content

Commit

Permalink
add thread sleep v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed May 13, 2024
1 parent 83ad59e commit fc11b2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hfd-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hfd-cli"
version = "0.2.2"
version = "0.2.3"
edition = "2021"

[dependencies]
Expand Down
5 changes: 4 additions & 1 deletion hfd-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ impl HfClient {
let url = self.hf_url.path(&file);
let path = self.root.join(&file);
let headers = self.headers.clone();
tasks.push(tokio::spawn(async move { download(headers, url, path, CHUNK_SIZE).await; }));
tasks.push(tokio::spawn(async move {
download(headers, url, path, CHUNK_SIZE).await;
std::thread::sleep(Duration::from_millis(10));
}));
}

for task in tasks {
Expand Down

0 comments on commit fc11b2d

Please sign in to comment.