StrictConcurrency: ValueConcurrentObserver is Sendable

Required for DatabaseCancellable conformance
This commit is contained in:
Gwendal Roué authored and Gwendal Roué committed 2024-07-27 16:37:33 +02:00
1 parent 5465d056ab
commit 87b9db65d1
1 file changed
+7 -2
@@ -18,7 +18,12 @@ import Foundation
/// reducing stage. /// reducing stage.
/// ///
/// **Notify** is calling user callbacks, in case of database change or error. /// **Notify** is calling user callbacks, in case of database change or error.
final class ValueConcurrentObserver<Reducer: ValueReducer, Scheduler: ValueObservationScheduler> { final class ValueConcurrentObserver<
Reducer: ValueReducer,
Scheduler: ValueObservationScheduler>: @unchecked Sendable
{
// @unchecked Sendable: see Mutable State below.
// MARK: - Configuration // MARK: - Configuration
// //
// Configuration is not mutable. // Configuration is not mutable.
@@ -72,7 +77,7 @@ final class ValueConcurrentObserver<Reducer: ValueReducer, Scheduler: ValueObser
// be notified. See error catching clauses. // be notified. See error catching clauses.
/// Ability to access the database /// Ability to access the database
private struct DatabaseAccess { private struct DatabaseAccess: Sendable {
/// The observed DatabasePool. /// The observed DatabasePool.
let dbPool: DatabasePool let dbPool: DatabasePool