Skip to content

feat: add utils/async/parallel#1896

Merged
kgryte merged 31 commits intostdlib-js:developfrom
nightknighto:parallel
Jun 27, 2024
Merged

feat: add utils/async/parallel#1896
kgryte merged 31 commits intostdlib-js:developfrom
nightknighto:parallel

Conversation

@nightknighto
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

What changes are needed here?

Comment thread lib/node_modules/@stdlib/utils/async/README.md
@nightknighto
Copy link
Copy Markdown
Contributor Author

@kgryte @Planeshifter

Comment thread lib/node_modules/@stdlib/utils/async/parallel/lib/limit.js Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/lib/factory.js Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/package.json Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/docs/types/test.ts Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/docs/types/test.ts Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/docs/types/test.ts Outdated
kgryte added 2 commits June 21, 2024 09:54
Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/utils/async/parallel/README.md Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/README.md Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/README.md Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/README.md Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/package.json Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/test/test.main.js Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/test/test.main.js Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/test/test.main.js Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/test/test.main.js Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/test/test.factory.js Outdated
Comment thread lib/node_modules/@stdlib/utils/async/parallel/test/test.factory.js Outdated
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Jun 21, 2024
Planeshifter and others added 3 commits June 21, 2024 21:31
Copy link
Copy Markdown
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
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