chore: Initial attemp to paralelize installations

This commit is contained in:
Sergio Gasquez 2022-12-20 16:24:16 +00:00
parent 4717922d99
commit c9fbf034bb

View File

@ -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()?;
}