mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
AsyncValueObservation is Sendable
This commit is contained in:
1 parent
48ad10aea8
commit
ce63cdfa60
2 files changed
+4
-3
No files matched your search
@@ -81,7 +81,7 @@ struct ValueObservationEvents: Refinable {
|
|||||||
var didCancel: (@Sendable () -> Void)?
|
var didCancel: (@Sendable () -> Void)?
|
||||||
}
|
}
|
||||||
|
|
||||||
typealias ValueObservationStart<T> = (
|
typealias ValueObservationStart<T> = @Sendable (
|
||||||
_ onError: @escaping @Sendable (Error) -> Void,
|
_ onError: @escaping @Sendable (Error) -> Void,
|
||||||
_ onChange: @escaping @Sendable (T) -> Void)
|
_ onChange: @escaping @Sendable (T) -> Void)
|
||||||
-> AnyDatabaseCancellable
|
-> AnyDatabaseCancellable
|
||||||
@@ -339,7 +339,8 @@ extension ValueObservation {
|
|||||||
/// You build an `AsyncValueObservation` from ``ValueObservation`` or
|
/// You build an `AsyncValueObservation` from ``ValueObservation`` or
|
||||||
/// ``SharedValueObservation``.
|
/// ``SharedValueObservation``.
|
||||||
@available(iOS 13, macOS 10.15, tvOS 13, *)
|
@available(iOS 13, macOS 10.15, tvOS 13, *)
|
||||||
public struct AsyncValueObservation<Element>: AsyncSequence {
|
public struct AsyncValueObservation<Element>: AsyncSequence, @unchecked Sendable {
|
||||||
|
// @unchecked Sendable because of `BufferingPolicy`.
|
||||||
public typealias BufferingPolicy = AsyncThrowingStream<Element, Error>.Continuation.BufferingPolicy
|
public typealias BufferingPolicy = AsyncThrowingStream<Element, Error>.Continuation.BufferingPolicy
|
||||||
public typealias AsyncIterator = Iterator
|
public typealias AsyncIterator = Iterator
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
- [X] association
|
- [X] association
|
||||||
- [X] associationaggregate
|
- [X] associationaggregate
|
||||||
- [X] associationtomany
|
- [X] associationtomany
|
||||||
- [ ] asyncvalueobservation
|
- [X] asyncvalueobservation
|
||||||
- [ ] asyncvalueobservation/iterator
|
- [ ] asyncvalueobservation/iterator
|
||||||
- [X] asyncvalueobservationscheduler
|
- [X] asyncvalueobservationscheduler
|
||||||
- [ ] belongstoassociation
|
- [ ] belongstoassociation
|
||||||
|
|||||||
Reference in new issue
Block a user