Sendable annotations for DatabaseRegionObservation

This commit is contained in:
Gwendal Roué committed 2024-02-16 08:34:21 +01:00
1 parent 1fe410de69
commit 7d379409f1
1 file changed
+3 -1
+3 -1
View File
@@ -214,9 +214,11 @@ extension DatabasePublishers {
}
}
private class DatabaseRegionSubscription<Downstream: Subscriber>: Subscription
private class DatabaseRegionSubscription<Downstream: Subscriber>: Subscription, @unchecked Sendable
where Downstream.Failure == Error, Downstream.Input == Database
{
// @unchecked because `cancellable` and `state` are protected by `lock`.
private struct WaitingForDemand {
let downstream: Downstream
let writer: any DatabaseWriter