Verified Commit 8d85cb2b authored by Nathan Harris's avatar Nathan Harris
Browse files

Update to use new `NIOAtomic` over deprecated `Atomic`

parent 9747cf2e
Pipeline #105270261 failed with stages
in 3 minutes and 21 seconds
......@@ -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 {
......
......@@ -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() }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment