You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stream/iter: broadcast consumer can leave earlier next() pending after overlapping next() calls #63499
As per spec 13.1.3, the second next should be pending and not resolve.
Broadcast.push() creates a consumer cursor that “advances the cursor on each step, waiting for new data if needed” in the spec. One written chunk should satisfy the earliest pending next() for that iterator. The second next() has no second chunk to read, and the broadcast has not been ended/cancelled, so it should wait for new data. It should only resolve { done: true, value: undefined } after clean completion, for example writer.end() or broadcast.cancel() with no reason.
Activity
trivikr commentedon May 25, 2026
As per spec 13.1.3, the second next should be pending and not resolve.
Broadcast.push()creates a consumer cursor that “advances the cursor on each step, waiting for new data if needed” in the spec. One written chunk should satisfy the earliest pendingnext()for that iterator. The secondnext()has no second chunk to read, and the broadcast has not been ended/cancelled, so it should wait for new data. It should only resolve{ done: true, value: undefined }after clean completion, for examplewriter.end()orbroadcast.cancel()with no reason.New repro
Observed
Expected as previous ask
Expected (actual)
2 remaining items
stream: keep overlapping broadcast reads pending
stream: keep overlapping broadcast reads pending
stream: keep overlapping broadcast reads pending
stream: keep overlapping broadcast reads pending