DatabaseRegionObservation is Sendable

This commit is contained in:
Gwendal Roué committed 2024-07-28 13:59:38 +02:00
1 parent ce63cdfa60
commit b4ff52fb7d
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -462,7 +462,7 @@ extension DatabaseRegion {
}
}
static func union(_ regions: [any DatabaseRegionConvertible]) -> (Database) throws -> DatabaseRegion {
static func union(_ regions: [any DatabaseRegionConvertible]) -> @Sendable (Database) throws -> DatabaseRegion {
return { db in
try regions.reduce(into: DatabaseRegion()) { union, region in
try union.formUnion(region.databaseRegion(db))
@@ -3,10 +3,10 @@ import Combine
#endif
import Foundation
public struct DatabaseRegionObservation {
public struct DatabaseRegionObservation: Sendable {
/// A closure that is evaluated when the observation starts, and returns
/// the observed database region.
var observedRegion: (Database) throws -> DatabaseRegion
var observedRegion: @Sendable (Database) throws -> DatabaseRegion
}
extension DatabaseRegionObservation {
+2 -2
View File
@@ -116,7 +116,7 @@
- [X] asyncvalueobservation
- [ ] asyncvalueobservation/iterator
- [X] asyncvalueobservationscheduler
- [ ] belongstoassociation
- [X] belongstoassociation
- [ ] columnexpression
- [ ] commontableexpression
- [X] configuration
@@ -137,7 +137,7 @@
- [-] databasepublishers/read
- [-] databasepublishers/value
- [-] databasepublishers/write
- [ ] databaseregionobservation
- [X] databaseregionobservation
- [X] databaseuuidencodingstrategy
- [X] defaulttransactionclock
- [ ] fetchablerecorddecoder