Fix documentation

This commit is contained in:
Gwendal Roué committed 2023-03-19 13:56:56 +01:00
1 parent 5d9b9edfe1
commit 5629cfe6ff
2 files changed
+8 -5

No files matched your search

+7 -4
View File
@@ -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.
+1 -1
View File
@@ -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)