mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
DispatchSpecificKey are nonisolated
This commit is contained in:
1 parent
a3b5001fed
commit
9b93ef7907
2 files changed
+3
-2
No files matched your search
@@ -22,7 +22,8 @@ import Dispatch
|
||||
/// - preconditionValidQueue() crashes whenever a database is used in an invalid
|
||||
/// dispatch queue.
|
||||
final class SchedulingWatchdog {
|
||||
private static let watchDogKey = DispatchSpecificKey<SchedulingWatchdog>()
|
||||
// TODO: remove nonisolated(unsafe) when DispatchSpecificKey is Sendable.
|
||||
nonisolated(unsafe) private static let watchDogKey = DispatchSpecificKey<SchedulingWatchdog>()
|
||||
private(set) var allowedDatabases: [Database]
|
||||
var databaseObservationBroker: DatabaseObservationBroker?
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ extension Dictionary {
|
||||
}
|
||||
|
||||
extension DispatchQueue {
|
||||
private static var mainKey: DispatchSpecificKey<()> = {
|
||||
nonisolated(unsafe) private static let mainKey: DispatchSpecificKey<()> = {
|
||||
let key = DispatchSpecificKey<()>()
|
||||
DispatchQueue.main.setSpecific(key: key, value: ())
|
||||
return key
|
||||
|
||||
Reference in new issue
Block a user