mirror of
https://github.com/swift-server/RediStack.git
synced 2026-05-03 07:32:28 +00:00
Update to use new NIOAtomic over deprecated Atomic
This commit is contained in:
@@ -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() }
|
||||
|
||||
Reference in New Issue
Block a user