Skip to content

Commit 8d85cb2

Browse files
committed
Update to use new NIOAtomic over deprecated Atomic
1 parent 9747cf2 commit 8d85cb2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/RediStack/RedisConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public final class RedisConnection: RedisClient {
129129

130130
internal let channel: Channel
131131

132-
private let autoflush = Atomic<Bool>(value: true)
132+
private let autoflush: NIOAtomic<Bool> = .makeAtomic(value: true)
133133
private let _stateLock = Lock()
134134
private var _state = ConnectionState.open
135135
private var state: ConnectionState {

Sources/RediStack/RedisMetrics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public struct RedisMetrics {
5959
/// A specialized wrapper class for working with `Metrics.Gauge` objects for the purpose of an incrementing or decrementing count of active Redis connections.
6060
public class ActiveConnectionGauge {
6161
private let gauge = Gauge(label: .activeConnectionCount)
62-
private let count = Atomic<Int>(value: 0)
62+
private let count: NIOAtomic<Int> = .makeAtomic(value: 0)
6363

6464
/// The number of the connections that are currently reported as active.
6565
var currentCount: Int { return count.load() }

0 commit comments

Comments
 (0)