Update to use new NIOAtomic over deprecated Atomic

This commit is contained in:
Nathan Harris
2019-12-16 15:45:52 -08:00
parent 9747cf2e2b
commit 8d85cb2bfa
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ public final class RedisConnection: RedisClient {
internal let channel: Channel
private let autoflush = Atomic<Bool>(value: true)
private let autoflush: NIOAtomic<Bool> = .makeAtomic(value: true)
private let _stateLock = Lock()
private var _state = ConnectionState.open
private var state: ConnectionState {
+1 -1
View File
@@ -59,7 +59,7 @@ public struct RedisMetrics {
/// A specialized wrapper class for working with `Metrics.Gauge` objects for the purpose of an incrementing or decrementing count of active Redis connections.
public class ActiveConnectionGauge {
private let gauge = Gauge(label: .activeConnectionCount)
private let count = Atomic<Int>(value: 0)
private let count: NIOAtomic<Int> = .makeAtomic(value: 0)
/// The number of the connections that are currently reported as active.
var currentCount: Int { return count.load() }