_ValueReducer inputs are Sendable

This commit is contained in:
Gwendal Roué committed 2024-02-11 16:56:21 +01:00
1 parent 8271fd4f5a
commit e26cceb4a9
1 file changed
+9 -4
@@ -1,10 +1,15 @@
/// Implementation details of `ValueReducer`.
public protocol _ValueReducer {
/// The type of fetched database values
associatedtype Fetched
// Sendable because fetched values will asynchronously jump from a
// database access dispatch queue to a reducer dispatch queue.
/// The type of fetched database values.
associatedtype Fetched: Sendable
/// The type of observed values
associatedtype Value
// Sendable because reduced values will asynchronously jump from a
// reducer dispatch queue to a user-provided queue (the main queue,
// most frequently).
/// The type of observed values.
associatedtype Value: Sendable
/// Transforms a fetched value into an eventual observed value. Returns nil
/// when observer should not be notified.