Skip to content

feat: add utils/async/parallel #1896

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

Merged
merged 31 commits into from
Jun 27, 2024
Merged

Conversation

nightknighto
Copy link
Contributor

Resolves #1811 .

Description

This pull request adds a new package utils/async/parallel. Execute functions in parallel, passing the results of all functions to a final callback.

Implemented as discussed in the issue.

Related Issues

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@kgryte kgryte added Needs Review A pull request which needs code review. Utilities Issue or pull request concerning general utilities. Accepted RFC feature request which has been accepted. Feature Issue or pull request for adding a new feature. and removed Accepted RFC feature request which has been accepted. labels Mar 17, 2024
@kgryte
Copy link
Member

kgryte commented Mar 17, 2024

/stdlib update-copyright-years

@kgryte kgryte added the Needs Changes Pull request which needs changes before being merged. label Mar 17, 2024
@nightknighto
Copy link
Contributor Author

What changes are needed here?

@nightknighto
Copy link
Contributor Author

@kgryte @Planeshifter

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Jun 21, 2024
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @Deadreyo.

I ended up refactoring a bit. We seem to diverge somewhat across @stdlib/utils/async in terms of whether the function returned by a factory method should accept a done argument. I ended up changing the implementation to require done be provided to the returned function. This made a bit more sense in my mind in terms of how I'd expect the reusable function to be used. One could probably make the argument that we should update series-waterfall similarly.

@kgryte kgryte removed the Needs Changes Pull request which needs changes before being merged. label Jun 27, 2024
@kgryte kgryte merged commit 294b868 into stdlib-js:develop Jun 27, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue or pull request for adding a new feature. Utilities Issue or pull request concerning general utilities.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add utils/async/parallel
4 participants