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

Extends Aigle.parallel functionality #57

Closed
suguru03 opened this issue Apr 13, 2018 · 1 comment
Closed

Extends Aigle.parallel functionality #57

suguru03 opened this issue Apr 13, 2018 · 1 comment
Assignees
Milestone

Comments

@suguru03
Copy link
Owner

I'm thinking to extend Aigle.parallel functionality as below,

(async () => {
  const array1 = await Aigle.parallel([
    (async () => 1)(),
    (async () => 2)(),
    (async () => 3)(),
  ]);
  console.log(array1); // [1, 2, 3]
  const array2 = await Aigle.parallel([
    async () => 1,
    async () => 2,
    async () => 3,
  ]);
  console.log(array2); // [[AsyncFunction], [AsyncFunction], [AsyncFunction]]
})();

// ↓

(async () => {
  const array3 = await Aigle.parallel([
    async () => 1,
    async () => 2,
    async () => 3,
  ]);
  console.log(array3); // [1, 2, 3]
})();

Also, I'll add Aigle.series and Aigle.parallelLimit which are smilar to async.series and async.parallelLimit.

@suguru03 suguru03 added this to the v1.12 milestone Apr 13, 2018
@suguru03 suguru03 modified the milestones: v1.12, v1.13 Apr 30, 2018
@suguru03 suguru03 self-assigned this Sep 4, 2018
@suguru03
Copy link
Owner Author

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant