writePublisher(updates:thenRead:) requires a Sendable Value

... But I don't know if region-based isolation and SE-0430 can relax this constraint or not.
This commit is contained in:
Gwendal Roué committed 2024-07-27 16:37:33 +02:00
1 parent e6a7d7dad4
commit cfd4a71efa
1 file changed
+2 -1
+2 -1
View File
@@ -772,6 +772,7 @@ extension DatabaseWriter {
.eraseToWritePublisher()
}
// TODO: GRDB7 Can SE-0430 avoid the T: Sendable constraint?
/// Returns a publisher that publishes one value and completes.
///
/// The database is not accessed until subscription. Value and completion
@@ -826,7 +827,7 @@ extension DatabaseWriter {
updates: @escaping @Sendable (Database) throws -> T,
thenRead value: @escaping @Sendable (Database, T) throws -> Output)
-> DatabasePublishers.Write<Output>
where S: Scheduler
where S: Scheduler, T: Sendable
{
OnDemandFuture { fulfill in
self.asyncWriteWithoutTransaction { db in