Closed
Description
SwiftNIO has landed EventLoopGroup singletons in 2.58.0
. See apple/swift-nio#2471.
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
)
}
}
- Add API
- Remove all
EventLoopGroup
usages in the README