Closed fabianfett closed 1 year ago
SwiftNIO has landed EventLoopGroup singletons in 2.58.0. See https://github.com/apple/swift-nio/pull/2471.
2.58.0
We should add an additional PostgresConnection connect method, that internally uses the existing one, but uses the NIO singleton:
extension PostgresConnection { static func connect( configuration: PostgresConnection.Configuration, id connectionID: PostgresConnection.ID, logger: Logger ) async throws -> PostgresConnection { try await Self.connect( on: MultiThreadedEventLoopGroup.singleton.any(), configuration: configuration, id: connectionID, logger: logger ) } }
EventLoopGroup
SwiftNIO has landed EventLoopGroup singletons in
2.58.0
. See https://github.com/apple/swift-nio/pull/2471.We should add an additional PostgresConnection connect method, that internally uses the existing one, but uses the NIO singleton:
EventLoopGroup
usages in the README