-
Notifications
You must be signed in to change notification settings - Fork 77
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
NIOTSELG: Provide EventLoopGroup.any() implementation #136
base: main
Are you sure you want to change the base?
Conversation
@@ -187,21 +187,6 @@ class NIOTSListenerChannelTests: XCTestCase { | |||
XCTAssertNoThrow(try channel.closeFuture.wait()) | |||
} | |||
|
|||
func testBindingChannelsOnShutdownEventLoopsFails() throws { |
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.
that wasn't actually a valid test. A shut down EL doesn't run anything...
@@ -647,21 +647,6 @@ class NIOTSConnectionChannelTests: XCTestCase { | |||
XCTAssertNoThrow(try channel.close().wait()) | |||
} | |||
|
|||
func testConnectingChannelsOnShutdownEventLoopsFails() throws { |
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.
that wasn't actually a valid test. A shut down EL doesn't run anything...
@@ -21,7 +21,7 @@ let package = Package( | |||
.library(name: "NIOTransportServices", targets: ["NIOTransportServices"]), | |||
], | |||
dependencies: [ | |||
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"), | |||
.package(url: "https://github.com/apple/swift-nio.git", .branch("main")), |
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.
It might be easiest to just immediately write this with a prediction of the version we need (it'll be the minor after the version we currently ship). The CI will fail, but that's fine, when it ships we should just be able to land this.
@@ -111,7 +128,18 @@ internal class NIOTSEventLoop: QoSEventLoop { | |||
|
|||
public func execute(qos: DispatchQoS, _ task: @escaping () -> Void) { | |||
// Ideally we'd not accept new work while closed. Sadly, that's not possible with the current APIs for this. | |||
self.taskQueue.async(qos: qos, execute: task) | |||
let taskQueue = self.taskQueueLock.withLock { |
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.
If we've got an on-event-loop fast-path, we should use it here.
See apple/swift-nio#2003 for details.