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

[node-core-library] Fix Async.forEachAsync concurrency #3410

Merged
merged 2 commits into from
May 10, 2022

Conversation

dmichon-msft
Copy link
Contributor

Summary

Fix a bug where Async.forEachAsync operating on an async iterable would exceed the max concurrency specified in the options.

Details

The state of "waiting for iterator to return" was not tracked as a concurrent operation, so more instances of the waiter function could be paused at the iterator than the maximum concurrency specified in the original call.

How it was tested

Affects concurrency of rush build. Validated that after the fix was applied that max concurrency of a highly-cached build was capped at the number of CPU cores.

@iclanton iclanton enabled auto-merge May 10, 2022 00:54
@iclanton iclanton merged commit 8887475 into microsoft:main May 10, 2022
@dmichon-msft dmichon-msft deleted the fix-async-concurrency branch May 10, 2022 01:19
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.

2 participants