refactor(concurrency): isolate ProviderConfig to the main actor and drop unneeded @unchecked Sendable
- ProviderConfig is now @MainActor instead of @unchecked Sendable; AppL10n reads the persisted UI language key directly so off-main string lookups stay valid. - EnglishLearningStore serializes its read-modify-write with a type-wide lock (several instances share one defaults key). - URLSession-only transports, GatewayGrantKeychainStore and Keychain conform to Sendable without @unchecked. UserDefaults/DeviceCheck wrappers keep @unchecked because those SDK types are not Sendable.
This commit is contained in:
@@ -13,7 +13,7 @@ public protocol AccountHTTPTransport: Sendable {
|
||||
func data(for request: URLRequest) async throws -> (Data, HTTPURLResponse)
|
||||
}
|
||||
|
||||
public final class URLSessionAccountHTTPTransport: AccountHTTPTransport, @unchecked Sendable {
|
||||
public final class URLSessionAccountHTTPTransport: AccountHTTPTransport, Sendable {
|
||||
private let session: URLSession
|
||||
|
||||
public init(session: URLSession = .shared) {
|
||||
|
||||
Reference in New Issue
Block a user