From 7d379409f190a1d0ac4375cfdea35f08237a7e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 11 Feb 2024 13:59:58 +0100 Subject: [PATCH] Sendable annotations for DatabaseRegionObservation --- GRDB/Core/DatabaseRegionObservation.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GRDB/Core/DatabaseRegionObservation.swift b/GRDB/Core/DatabaseRegionObservation.swift index 4fc1b5b36..15d665981 100644 --- a/GRDB/Core/DatabaseRegionObservation.swift +++ b/GRDB/Core/DatabaseRegionObservation.swift @@ -214,9 +214,11 @@ extension DatabasePublishers { } } - private class DatabaseRegionSubscription: Subscription + private class DatabaseRegionSubscription: 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