Repository navigation
feat(http2): add an executor getter for server and client - #4250
Open
robertream wants to merge 1 commit into
Open
robertream wants to merge 1 commit into
robertream wants to merge 1 commit into
Conversation
robertream
force-pushed
the
http2-builder-executor
branch
from
October 29, 2026 11:46
720a9a0 to
8bae438
Compare
`Builder::new(exec)` is the only constructor on either HTTP/2 builder and the executor cannot be read back, so a caller that needs it for work alongside a connection keeps a second copy with nothing relating the two. `impl<E> Builder<E>` is unconstrained, so the accessor needs no bound, and returning `&E` leaves cloning to the caller.
robertream
force-pushed
the
http2-builder-executor
branch
from
October 29, 2026 11:53
8bae438 to
f10811e
Compare
cratelyn
reviewed
Oct 29, 2026
cratelyn
left a comment
Member
There was a problem hiding this comment.
hello, thank you for opening a pull request! my initial reaction is some skepticism that this new interface is truly needed.
the executor you'd want is the one already driving the connection, but there's no way to read it back off the builder, so you keep a second copy and hope they match.
i'm not sure what you mean by "second copy and hope they match". types like TokioExecutor can be freely cloned, since they are essentially an abstraction over functions like tokio::spawn etc.
is there a situation where not having access to the inner E can cause a bug or other incorrectness? is cloning the executor when constructing the server/client and passing it forward not possible?
This branch has not been deployed
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.
Ran into this writing a WebTransport extension: a session has to be spawned once the response is out, and the executor you'd want is the one already driving the connection, but there's no way to read it back off the builder, so you keep a second copy and hope they match. Adds a getter on both builders.