nodejs / nodejs/node

Stream.prototype.forEach will block in first promise in queue before read more chunk

Open Beginner friendly
#66,106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

doc
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Affected URL(s)

No response

Description of the problem

The forEach supports concurrency run fn on chunk, but actually it implements by map which causes that before first promise in queue ends, it doesn't read more chunk and run into queue.
I think doc should clear this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Stream.prototype.forEach documentation and reviewing its concurrency wording against the described queue behavior. Done when the documentation clearly explains whether additional chunks are read while earlier promises are pending.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.