Skip to content

Commit 382b0e1

Browse files
authored
Replace Lock with new NIOLock (#305)
SwiftNIO `2.42.0` has deprecated `Lock` and replaced it with a new `NIOLock`. This commit removes all uses of `Lock` and replaces them with `NIOLock`. Further, require new package versions.
1 parent 08226c5 commit 382b0e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ let package = Package(
1414
],
1515
dependencies: [
1616
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"),
17-
.package(url: "https://github.com/apple/swift-nio.git", from: "2.41.1"),
18-
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.11.4"),
19-
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.14.1"),
17+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.42.0"),
18+
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.13.1"),
19+
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.22.1"),
2020
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "3.0.0"),
2121
.package(url: "https://github.com/apple/swift-metrics.git", from: "2.0.0"),
22-
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
22+
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.4"),
2323
],
2424
targets: [
2525
.target(name: "PostgresNIO", dependencies: [

Sources/PostgresNIO/New/PostgresRowSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ extension PostgresRowSequence {
7070
}
7171

7272
final class AsyncStreamConsumer {
73-
let lock = Lock()
73+
let lock = NIOLock()
7474

7575
let lookupTable: [String: Int]
7676
let columns: [RowDescription.Column]

0 commit comments

Comments
 (0)