-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add sync option support to HTTP2StreamChannel #282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Want to follow-up with a separate patch to use the sync options API on the underlying channel to get at the autoRead channel option when it's available?
} | ||
} | ||
|
||
private func setOption0<Option: ChannelOption>(_ option: Option, value: Option.Value) throws { | ||
assert(eventLoop.inEventLoop) | ||
self.eventLoop.assertInEventLoop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As these are now called publicly through APIs where the user is required to get them correct, I think we should lift these up to preconditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, per earlier note I do have feedback here.
7cfb8cf
to
320e4a3
Compare
All the CI -- except for the nightly job, which is expected to fail -- run without failures until they hit an issue reporting the status. |
Motivation: SwiftNIO 2.27.0 added support for synchronous channel options allowing callers to get options synchronously -- saving a future allocation -- if they know they're on the correct event loop. 'HTTP2StreamChannel' should support this. Modifications: - Add 'HTTP2StreamChannel.SynchronousOptions' with conformance to 'NIOSynchronousChannelOptions' Result: Callers can get and set options synchronously on 'HTTP2StreamChannel'
320e4a3
to
7c2c119
Compare
@swift-nio-bot test this please |
Merging over the nightly failure. |
Motivation:
SwiftNIO 2.27.0 added support for synchronous channel options allowing
callers to get options synchronously -- saving a future allocation -- if
they know they're on the correct event loop. 'HTTP2StreamChannel' should
support this.
Modifications:
'NIOSynchronousChannelOptions'
Result:
Callers can get and set options synchronously on 'HTTP2StreamChannel'