add multi-channels example
This commit is contained in:
parent
f62a84ad07
commit
ff3fbd2eb4
@ -29,7 +29,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
tx.as_ref().unwrap().send(url).await.unwrap();
|
tx.as_ref().unwrap().send(url).await.unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println!("links: {}", links.len());
|
|
||||||
let mut results = vec![];
|
let mut results = vec![];
|
||||||
// recieve the results and send back new url to the workers
|
// recieve the results and send back new url to the workers
|
||||||
while let Some((idx, res)) = rx.recv().await {
|
while let Some((idx, res)) = rx.recv().await {
|
||||||
|
Loading…
Reference in New Issue
Block a user