forked from grpc/grpc-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt h2handler multiplexer (grpc#1587)
Motivation: Switch from `HTTP2StreamMultiplexer` to `HTTP2Handler.StreamMultiplexer` to benefit from improved performance due to reduced allocations. Modifications: - Replace all references to `HTTP2StreamMultiplexer` with `HTTP2Handler.StreamMultiplexer`. - `GRPCIdleHandler` is now a `NIOHTTP2StreamDelegate` to allow it to receive notifications when a stream is created or closed rather than using `UserInboundEvent`s. - `GRPCIdleHandler` now has two states of configuration in the client case. This is required to break a cycle of dependencies which would otherwise exist at `init` because the `GRPCIdleHandler` holds a reference to the `HTTP2Handler.StreamMultiplexer` (which is a member of the `HTTP2Handler` itself) and the `HTTP2Handler` holds a reference back to the `GRPCIdleHandler` as its stream delegate. - Several tests now insert `HTTP2Handler` into the pipeline where they used to use `HTTP2StreamMultiplexer`. This causes a few changes in behavior often around different assertions. This required some small supporting changes. - Introduce test infrastructure `AsyncEventStreamConnectionPoolDelegate` to eliminate observed racey behavior in `EventRecordingConnectionPoolDelegate`. Result: Performance increase without Overall behavior changes.
- Loading branch information
Showing
18 changed files
with
867 additions
and
484 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.