Conversation
While the Broadcast is still open, maintain buffered data when consumer count reaches zero Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
…st paths Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode
Collaborator
|
Review requested:
|
jasnell
marked this pull request as draft
September 15, 2026 03:54
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #66030 +/- ##
==========================================
- Coverage 90.22% 90.22% -0.01%
==========================================
Files 787 787
Lines 270307 270614 +307
Branches 51726 51806 +80
==========================================
+ Hits 243890 244166 +276
- Misses 16899 16920 +21
- Partials 9518 9528 +10
🚀 New features to boost your workflow:
|
panva
reviewed
Sep 15, 2026
| this.#sourceError = error; | ||
| this.#sourceExhausted = true; | ||
| } finally { | ||
| if (this.#sourceExhausted) this.#cleanupFactorySignal(); |
Member
There was a problem hiding this comment.
Source exhaustion does not mean all consumers have finished. This removes the factory abort listener as soon as the fastest consumer reaches the end, while slower consumers can still have buffered data.
For example, create share('x', { signal }) with two consumers, exhaust the first, then abort. The second consumer's next() now returns 'x' instead of rejecting with the abort reason. Please retain the listener until the remaining active consumers finish, and add that case to the signal lifetime test.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another round of streams/iter fixes.
Builds on: #66028 ... The first four commits are from that PR. This will remain a draft until that one lands