diff --git a/GRDB/Core/Configuration.swift b/GRDB/Core/Configuration.swift index 495b32690..58889b4bb 100644 --- a/GRDB/Core/Configuration.swift +++ b/GRDB/Core/Configuration.swift @@ -301,13 +301,15 @@ public struct Configuration { /// If nil, GRDB picks a default one. var readonlyBusyMode: Database.BusyMode? = nil - /// The maximum number of concurrent read-only connections. + /// The maximum number of concurrent reader connections. /// - /// This configuration applies to ``DatabasePool`` only. The default value - /// is 5. + /// This configuration has effect on ``DatabasePool`` and + /// ``DatabaseSnapshotPool`` only. The default value is 5. /// /// You can query this value at runtime in order to get the actual capacity - /// for concurrent reads of any ``DatabaseReader``. For example: + /// for concurrent reads of any ``DatabaseReader``. In this context, + /// ``DatabaseQueue`` and ``DatabaseSnapshot`` have a capacity of 1, + /// because they can't perform two concurrent reads. For example: /// /// ```swift /// var config = Configuration() @@ -321,6 +323,7 @@ public struct Configuration { /// print(dbQueue.configuration.maximumReaderCount) // 1 /// print(dbPool.configuration.maximumReaderCount) // 5 /// print(dbSnapshot.configuration.maximumReaderCount) // 1 + /// ``` public var maximumReaderCount: Int = 5 /// The quality of service of database accesses. diff --git a/GRDB/Core/SerializedDatabase.swift b/GRDB/Core/SerializedDatabase.swift index d7c4d4fbf..8861deb9c 100644 --- a/GRDB/Core/SerializedDatabase.swift +++ b/GRDB/Core/SerializedDatabase.swift @@ -222,7 +222,7 @@ final class SerializedDatabase { } } - // Schedules database operations for execution, and returns immediately. + /// Schedules database operations for execution, and returns immediately. func async(_ block: @escaping (Database) -> Void) { queue.async { block(self.db)