fix: moved Repeater thread from background QoS to default. Because the background thread will be blocked when full load. It makes the app unuseful when the system is loaded because the reader is not triggered and there is no live data about system usage.

This commit is contained in:
Serhiy Mytrovtsiy
2023-06-28 19:00:02 +02:00
parent 1e0ba3b61f
commit 1a76eb7b97

View File

@@ -20,7 +20,7 @@ public class Repeater {
private var callback: (() -> Void)
private var state: State = .paused
private var timer: DispatchSourceTimer = DispatchSource.makeTimerSource(queue: DispatchQueue(label: "eu.exelban.Stats", qos: .background))
private var timer: DispatchSourceTimer = DispatchSource.makeTimerSource(queue: DispatchQueue(label: "eu.exelban.Stats.Repeater", qos: .default))
public init(seconds: Int, callback: @escaping (() -> Void)) {
self.callback = callback