diff --git a/GRDB/Core/Configuration.swift b/GRDB/Core/Configuration.swift index bf3d17f03..f604890f5 100644 --- a/GRDB/Core/Configuration.swift +++ b/GRDB/Core/Configuration.swift @@ -46,6 +46,8 @@ import Foundation /// ### Configuring the Quality of Service /// /// - ``qos`` +/// - ``readQoS`` +/// - ``writeQoS`` /// - ``targetQueue`` /// - ``writeTargetQueue`` public struct Configuration { @@ -337,11 +339,16 @@ public struct Configuration { /// The default is `userInitiated`. public var qos: DispatchQoS = .userInitiated - /// The quality of service of read accesses - var readQoS: DispatchQoS { + /// The effective quality of service of read-only database accesses. + public var readQoS: DispatchQoS { targetQueue?.qos ?? self.qos } + /// The effective quality of service of write database accesses. + public var writeQoS: DispatchQoS { + writeTargetQueue?.qos ?? targetQueue?.qos ?? self.qos + } + /// The target dispatch queue for database accesses. /// /// Database connections which are not read-only will prefer