Use DOWNLOAD_WORKERS more
This commit is contained in:
		
							parent
							
								
									c5dab76260
								
							
						
					
					
						commit
						d5c3107e09
					
				| 
						 | 
				
			
			@ -67,8 +67,8 @@ pub async fn run(args: env::Args) {
 | 
			
		|||
        handle.await.unwrap();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    let mut handles = Vec::with_capacity(5);
 | 
			
		||||
    let (tx, mut rx) = mpsc::channel(5);
 | 
			
		||||
    let mut handles = Vec::with_capacity(DOWNLOAD_WORKERS);
 | 
			
		||||
    let (tx, mut rx) = mpsc::channel(DOWNLOAD_WORKERS);
 | 
			
		||||
    tokio::spawn(async move {
 | 
			
		||||
        while let Some(ntx) = rx.recv().await {
 | 
			
		||||
            let ntx: oneshot::Sender<(String, String)> = ntx;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue