Skip to content

Commit 516d16a

Browse files
committed
Conform CoreDataRepository to Sendable
feature/sendable
1 parent f9b1905 commit 516d16a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Sources/CoreDataRepository/CoreDataRepository.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ import Foundation
2222
/// For fetch and aggregate operations, there are additional subscription and throwing subscription options.
2323
/// Subscriptions return an ``AsyncStream`` of
2424
/// ``Result``s with strongly typed errors. Throwing subscriptions return an ``AsyncThrowingStream``.
25-
public final class CoreDataRepository {
25+
///
26+
/// All uses of ``context`` are wrapped in `perform` or `performAndWait` blocks so ``CoreDataRepository`` is concurrency
27+
/// safe.
28+
public final class CoreDataRepository: @unchecked Sendable {
2629
/// CoreData context the repository uses. A child or 'scratch' context is usually created from this context for work
2730
/// to be performed in.
2831
public let context: NSManagedObjectContext

0 commit comments

Comments
 (0)