Repository navigation
Conversation
Signed-off-by: Tim Perry <pimterry@gmail.com>
Collaborator
|
Review requested:
|
Member
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67749 +/- ##
==========================================
- Coverage 90.55% 90.52% -0.04%
==========================================
Files 803 803
Lines 285111 285117 +6
Branches 55039 55022 -17
==========================================
- Hits 258186 258103 -83
- Misses 17080 17155 +75
- Partials 9845 9859 +14
🚀 New features to boost your workflow:
|
efekrskl
approved these changes
Nov 24, 2026
Contributor
|
For me it is ok. Either way, it is possible to implement the W3C webstreams and waituntilavailable. lgtm |
Collaborator
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.
The QUIC API stream creation methods are
asyncand return promises, but they never wait for anything. Discussed briefly in #65331 (comment).The only situation where there's some actual async work anywhere is pending streams (blocked on flow control, or incomplete initial handshake). In that case we do return immediately today (promise resolves immediately) but just with
stream.pendingset totrue.That is correct imo: we do want to return immediately, because we want to allow queueing operations immediately without waiting for the stream to actually open, e.g. so you can start queueing up requests on streams straight away, without separately waiting for the handshake to complete.
In the case where you really want to wait for the stream to open before you use it, you just create the stream then use
await stream.opened. This already works today.Making this API async when it doesn't actually wait is confusing (suggests
awaitwill actually wait for opened somehow). It also adds an unnecessary promise & microtask for every stream, and similarly forces the calling code to be async, etc.This PR drops that:
asyncfrom the methods.awaitfrom a large number of existing calls.waitUntilAvailabletext, which implied the promise would wait for flow control (it didn't - it returns as pending).createStreamdebug message.stream.pendingThe alternative to all this is to make stream creation actually wait (at least in some cases). I don't see much upside though, and this approach roughly matches
node:http2.