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.
///
/// **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
//
// Configuration is not mutable.
@@ -72,7 +77,7 @@ final class ValueConcurrentObserver<Reducer: ValueReducer, Scheduler: ValueObser
// be notified. See error catching clauses.
/// Ability to access the database
private struct DatabaseAccess {
private struct DatabaseAccess: Sendable {
/// The observed DatabasePool.
let dbPool: DatabasePool