mirror of
https://github.com/esp-rs/espup.git
synced 2025-09-29 05:40:40 +00:00
chore: ✨ Initial attemp to paralelize installations
This commit is contained in:
parent
4717922d99
commit
c9fbf034bb
15
src/main.rs
15
src/main.rs
@ -220,13 +220,24 @@ async fn install(args: InstallOpts) -> Result<()> {
|
||||
}
|
||||
|
||||
// With a list of applications to install, install them all in parallel.
|
||||
let (tx, mut rx) = mpsc::channel::<()>(32);
|
||||
let (tx, mut rx) = mpsc::channel::<Vec<String>>(32);
|
||||
|
||||
for app in to_install {
|
||||
// FIXME: parallelize!
|
||||
exports.extend(app.install().await?);
|
||||
|
||||
// let tx = tx.clone();
|
||||
// tokio::spawn(async move {
|
||||
// let res = app.install().await;
|
||||
// let res = res.unwrap();
|
||||
// tx.send(res).await.unwrap();
|
||||
// });
|
||||
}
|
||||
|
||||
// let mut exports = Vec::new();
|
||||
// while let Some(name) = rx.recv().await {
|
||||
// exports.extend(name);
|
||||
// }
|
||||
|
||||
if args.profile_minimal {
|
||||
clear_dist_folder()?;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user