stream: preserve falsy cancellation reasons - #64705
Open
trivikr wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64705 +/- ##
=======================================
Coverage 90.32% 90.32%
=======================================
Files 760 760
Lines 249130 249134 +4
Branches 47041 47050 +9
=======================================
+ Hits 225030 225039 +9
+ Misses 15490 15487 -3
+ Partials 8610 8608 -2
🚀 New features to boost your workflow:
|
trivikr
force-pushed
the
stream-iter-broadcast-share-falsy-cancellation
branch
from
August 4, 2026 05:02
ad6e53b to
bf47906
Compare
Use undefined as the no-error sentinel when cancelling broadcast and share consumers. This ensures that 0, an empty string, false, and null are propagated instead of being converted to clean completion. Make sync share surface cancellation reasons before handling detached consumers, and add regression coverage for async and sync consumers. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol
trivikr
force-pushed
the
stream-iter-broadcast-share-falsy-cancellation
branch
from
August 12, 2026 15:48
bf47906 to
0f06c0f
Compare
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.
Fixes: #64704
Previously, falsy reasons such as
0,'',false, andnullwere storedbut later treated as if no error existed. Consumers that had not started
waiting would therefore observe clean completion instead of the supplied
cancellation reason. Sync share also checked whether a consumer was detached
before surfacing its stored cancellation error.
This change uses
undefinedas the no-error sentinel and checks cancellationreasons explicitly. Sync share now surfaces the reason before handling the
detached state.
Assisted-by: codex:gpt-5.6-sol