Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/async #108

Merged
merged 12 commits into from
Dec 23, 2022
Merged

Feature/async #108

merged 12 commits into from
Dec 23, 2022

Conversation

SergioGasquez
Copy link
Member

@SergioGasquez SergioGasquez commented Dec 22, 2022

Make installation async

@SergioGasquez SergioGasquez marked this pull request as ready for review December 22, 2022 11:19
@SergioGasquez SergioGasquez linked an issue Dec 22, 2022 that may be closed by this pull request
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Nice that we can install in parallel now, nice job!

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one small comment but by no means a blocker. Glad you were able to get this experiment fleshed out and working!

Comment on lines +238 to 241
for _ in 0..installable_items {
let names = rx.recv().await.unwrap();
exports.extend(names);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for _ in 0..installable_items {
let names = rx.recv().await.unwrap();
exports.extend(names);
}
while let Some(names) = rx.recv().await {
exports.extend(names);
}

What you have is fine of course, but maybe this is a bit cleaner?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this at first, but it was not working correctly (not really sure why). If I use the while loop, the installation will never end, as it gets stuck in the while loop.

@SergioGasquez SergioGasquez merged commit 6dbb862 into main Dec 23, 2022
@SergioGasquez SergioGasquez deleted the feature/async branch December 23, 2022 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the installation process async
4 participants