Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to spec version of 1 April 2019 #21

Merged
merged 3 commits into from
Apr 4, 2019
Merged

Conversation

MattiasBuelens
Copy link
Owner

This aligns the implementation with spec version 6f94580 of 1 April 2019.

Comparison: whatwg/streams@2c8f35e...6f94580

Currently, when one branch calls pull(), it is possible that we call
read() - even though a read() is still pending from a previous pull()
call by the other branch. This can lead to reading too many chunks from
the original streams, and unnecessarily filling up the queues of the
branches past their high water mark.

This PR fixes that issue by only starting a new read() if the previous
read() was resolved. As a bonus, there will now be only one read() that
resolves with { done: true } when the original stream closes, so we no
longer need to keep track of whether we already closed the two branches.
@MattiasBuelens MattiasBuelens added enhancement domain: compliance Issues related to compliance with the streams standard labels Apr 4, 2019
@MattiasBuelens MattiasBuelens added this to the v2.0.3 milestone Apr 4, 2019
@MattiasBuelens MattiasBuelens self-assigned this Apr 4, 2019
@MattiasBuelens MattiasBuelens merged commit c1eca60 into master Apr 4, 2019
@MattiasBuelens MattiasBuelens deleted the update-20190401 branch April 4, 2019 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: compliance Issues related to compliance with the streams standard enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant