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

Remove ServerChildChannel generic associatedtype from ApplicationProtocol #426

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

adam-fowler
Copy link
Member

Instead use any ServerChildChannel. We don’t gain any real benefit from the parameter being a generic over an existential, it gets converted to an existential Service anyway. But I’ve had to jump through a number of hoops to ensure we can keep generic parameters where they do make a performance improvement.

The reason I’m doing this is I was trying to flip between a TLS and non-TLS child channel when build an application and it was really quite awkward as the child channel changed the type of the Application. Removing the ServerChildChannel generic parameter simplifies this considerably.

…ocol

Instead use any ServerChildChannel . We don’t get any real benefit from the parameter being a generic over an existential, it gets converted to an existential Service anyway. But I’ve had to jump through a number of hoops to ensure we can keep generic parameters where they do make a performance improvement. The reason I’m doing this is I was trying to flip between a TLS and non-TLS child channel when build an application and it was really quite awkward as the child channel changed the type of the Application. Removing the ServerChildChannel generic parameter simplifies this considerably.
@adam-fowler adam-fowler requested a review from Joannis April 23, 2024 16:38
adam-fowler and others added 2 commits April 23, 2024 19:46
Co-authored-by: Joannis Orlandos <joannis@orlandos.nl>
Co-authored-by: Joannis Orlandos <joannis@orlandos.nl>
@adam-fowler adam-fowler merged commit f1e6d1c into main Apr 23, 2024
4 of 5 checks passed
@adam-fowler adam-fowler deleted the existential-server-channel branch April 23, 2024 19:32
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