mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Rename SchedulingWatchdog.makeSerializedQueueAllowing(database:) to SchedulingWatchdog.makeSerializedQueue(allowingDatabase:)
This commit is contained in:
1 parent
bf30c7cb01
commit
54e9803080
2 files changed
+3
-3
No files matched your search
@@ -7,7 +7,7 @@
|
||||
/// https://github.com/groue/GRDB.swift/issues/55. To support this use case, a
|
||||
/// single dispatch queue can be temporarily shared by two or more connections.
|
||||
///
|
||||
/// - SchedulingWatchdog.makeSerializedQueueAllowing(database:) creates a
|
||||
/// - SchedulingWatchdog.makeSerializedQueue(allowingDatabase:) creates a
|
||||
/// dispatch queue that allows one database.
|
||||
///
|
||||
/// It does so by registering one instance of SchedulingWatchdog as a specific
|
||||
@@ -27,7 +27,7 @@ final class SchedulingWatchdog {
|
||||
allowedDatabases = [database]
|
||||
}
|
||||
|
||||
static func makeSerializedQueueAllowing(database: Database) -> DispatchQueue {
|
||||
static func makeSerializedQueue(allowingDatabase database: Database) -> DispatchQueue {
|
||||
let queue = DispatchQueue(label: "GRDB.SerializedDatabase")
|
||||
let watchdog = SchedulingWatchdog(allowedDatabase: database)
|
||||
queue.setSpecific(key: specificKey, value: watchdog)
|
||||
|
||||
@@ -35,7 +35,7 @@ final class SerializedDatabase {
|
||||
config.threadingMode = .multiThread
|
||||
|
||||
db = try Database(path: path, configuration: config, schemaCache: schemaCache)
|
||||
queue = SchedulingWatchdog.makeSerializedQueueAllowing(database: db)
|
||||
queue = SchedulingWatchdog.makeSerializedQueue(allowingDatabase: db)
|
||||
try queue.sync {
|
||||
try db.setup()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user