Skip to content

Resolve pull when read is successful#222

Merged
reillyeon merged 2 commits into
mainfrom
resolve_pull
Feb 18, 2026
Merged

Resolve pull when read is successful#222
reillyeon merged 2 commits into
mainfrom
resolve_pull

Conversation

@reillyeon
Copy link
Copy Markdown
Collaborator

It appears that the "Note" that immediately returning a resolved Promise is required to allow a stream to be cancelled while there is a pull() in progress was incorrect. The steps are updated to return a Promise that is resolved when the pull() succeeds.

Fixed #221.

It appears that the "Note" that immediately returning a resolved Promise
is required to allow a stream to be cancelled while there is a pull() in
progress was incorrect. The steps are updated to return a Promise that
is resolved when the pull() succeeds.

Fixed #221.
@reillyeon reillyeon requested a review from nondebug February 18, 2026 02:38
Copy link
Copy Markdown
Collaborator

@nondebug nondebug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@reillyeon reillyeon merged commit 11f6161 into main Feb 18, 2026
2 checks passed
@reillyeon reillyeon deleted the resolve_pull branch February 18, 2026 22:50
github-actions Bot added a commit that referenced this pull request Feb 18, 2026
SHA: 11f6161
Reason: push, by reillyeon

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sheikhharis50 pushed a commit to Sheikhharis50/neurobrowser that referenced this pull request May 16, 2026
WICG/serial#222 updates the pull algorithm to
return a Promise that is resolved when the read is complete. This
prevents Pull() from being called again until the previous read has
completed. The original code was written with the belief (now apparently
untrue) that Cancel() would not be called until the Promise returned by
Pull() was resolved.

Fixed: 485286889
Change-Id: Id118be8f1e421e1c64c998f8c227ff5e73638bae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7586497
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1587363}
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.

Should pullAlgorithm resolve when the pull actually finishes?

2 participants