Skip to content

Conversation

@aduh95
Copy link
Contributor

It was simply calling SafePromiseAllSettled, which itself calls arrayToSafePromiseIterable which wraps all promises into new SafePromise object and wraps it into a SafeArrayIterator. Since we don't care about the return value, we can take some shortcuts.

constarrayToSafePromiseIterable=(promises,mapFn)=>
newprimordials.SafeArrayIterator(
ArrayPrototypeMap(
promises,
(promise,i)=>
newSafePromise((a,b)=>PromisePrototypeThen(mapFn==null ? promise : mapFn(promise,i),a,b)),
),
);

It was simply calling `SafePromiseAllSettled`, which itself calls `arrayToSafePromiseIterable` which wraps all promises into new `SafePromise` object and wraps it into a `SafeArrayIterator`. Since we don't care about the return value, we can take some shortcuts.
@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 20, 2023
@aduh95aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 21, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 21, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Dec 21, 2023

@aduh95aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 21, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 22, 2023
@nodejs-github-botnodejs-github-bot merged commit bc16952 into nodejs:mainDec 22, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in bc16952

@aduh95aduh95 deleted the SafePromiseAllSettledReturnVoid branch December 23, 2023 00:48
RafaelGSS pushed a commit that referenced this pull request Jan 2, 2024
It was simply calling `SafePromiseAllSettled`, which itself calls `arrayToSafePromiseIterable` which wraps all promises into new `SafePromise` object and wraps it into a `SafeArrayIterator`. Since we don't care about the return value, we can take some shortcuts. PR-URL: #51243 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: James M Snell <[email protected]>
@RafaelGSSRafaelGSS mentioned this pull request Jan 2, 2024
richardlau pushed a commit that referenced this pull request Mar 25, 2024
It was simply calling `SafePromiseAllSettled`, which itself calls `arrayToSafePromiseIterable` which wraps all promises into new `SafePromise` object and wraps it into a `SafeArrayIterator`. Since we don't care about the return value, we can take some shortcuts. PR-URL: #51243 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: James M Snell <[email protected]>
@richardlaurichardlau mentioned this pull request Mar 25, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@aduh95@nodejs-github-bot@jasnell@targos@H4ad