Use DOWNLOAD_WORKERS more

This commit is contained in:
blank X 2020-09-12 20:54:26 +07:00
parent c5dab76260
commit d5c3107e09
1 changed files with 2 additions and 2 deletions

View File

@ -67,8 +67,8 @@ pub async fn run(args: env::Args) {
handle.await.unwrap(); handle.await.unwrap();
} }
let mut handles = Vec::with_capacity(5); let mut handles = Vec::with_capacity(DOWNLOAD_WORKERS);
let (tx, mut rx) = mpsc::channel(5); let (tx, mut rx) = mpsc::channel(DOWNLOAD_WORKERS);
tokio::spawn(async move { tokio::spawn(async move {
while let Some(ntx) = rx.recv().await { while let Some(ntx) = rx.recv().await {
let ntx: oneshot::Sender<(String, String)> = ntx; let ntx: oneshot::Sender<(String, String)> = ntx;