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

Add ReadableStream.pull() and queuing strategies #4

Merged
merged 2 commits into from
Nov 23, 2024
Merged

Conversation

yassernasc
Copy link
Contributor

My attempts to implement this so far have been quite a lame, but I think my progress on the tests is usable.

The biggest challenges IMO are:

  • Adapting the streamx backpressure to ByteLengthQueuingStrategy without breaking Hyrum's law.
  • Get a CountQueuingStrategy implementation (which is sadly the default) to be reliable.

These challenges are similar for the controller.desiredSize field.

Another good case for a test is "If the (pull) function returns a promise, then it will not be called again until that promise fulfills.".

@kasperisager kasperisager changed the title WIP: Implement ReadableStream.pull Add ReadableStream.pull() and queuing strategies Nov 23, 2024
@kasperisager kasperisager marked this pull request as ready for review November 23, 2024 12:09
@kasperisager kasperisager merged commit 2accccf into main Nov 23, 2024
3 checks passed
@kasperisager kasperisager deleted the pull branch November 23, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants