FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: settle pending broadcast reads on return by trivikr · Pull Request #63603 · nodejs/node · GitHub

/ node Public

stream: settle pending broadcast reads on return - #63603

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:stream-iter-pending-next-hang-2
May 31, 2026
Merged

stream: settle pending broadcast reads on return#63603
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:stream-iter-pending-next-hang-2

Conversation

trivikr commented May 28, 2026

Copy link
Copy Markdown
Member

This updates broadcast async iterator cleanup so a pending
next() settles when the consumer is returned.

When a broadcast consumer has an outstanding next() and
return() is called before data arrives, the pending read is now
resolved with { done: true, value: undefined } during detach.

Fixes: #63519


Assisted-by: openai:gpt-5.5

Resolve pending next() calls when broadcast consumers are returned,
so the promise does not remain pending after iterator cleanup.

Fixes: nodejs#63519

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels May 28, 2026
trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label May 28, 2026

codecov Bot commented May 28, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.31%. Comparing base (4639dcb) to head (273ae63).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63603      +/-   ##
==========================================
+ Coverage   90.29%   90.31%   +0.02%     
==========================================
  Files         730      730              
  Lines      234695   234696       +1     
  Branches    43956    43954       -2     
==========================================
+ Hits       211927   211976      +49     
+ Misses      14494    14431      -63     
- Partials     8274     8289      +15     
Files with missing lines Coverage Δ
lib/internal/streams/iter/broadcast.js 85.25% <100.00%> (+0.01%) ⬆️

... and 48 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 28, 2026

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

trivikr added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label May 28, 2026

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

mcollina added the commit-queue Add this label to land a pull request using GitHub Actions. label May 31, 2026
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 31, 2026
nodejs-github-bot merged commit 040c51c into nodejs:main May 31, 2026
86 checks passed

Copy link
Copy Markdown
Collaborator

Landed in 040c51c

trivikr deleted the stream-iter-pending-next-hang-2 branch June 4, 2026 05:02
aduh95 pushed a commit that referenced this pull request Jun 18, 2026
Resolve pending next() calls when broadcast consumers are returned,
so the promise does not remain pending after iterator cleanup.

Fixes: #63519

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: #63603
Fixes: #63519
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
aduh95 pushed a commit to aduh95/node that referenced this pull request Jul 30, 2026
Resolve pending next() calls when broadcast consumers are returned,
so the promise does not remain pending after iterator cleanup.

Fixes: nodejs#63519

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: nodejs#63603
Fixes: nodejs#63519
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 6, 2026
Resolve pending next() calls when broadcast consumers are returned,
so the promise does not remain pending after iterator cleanup.

Fixes: #63519

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: #63603
Backport-PR-URL: #64675
Fixes: #63519
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream/iter: pending next() hangs after iterator return()

4 participants


Back | FazBrowse Home | New Git URL