Hutch/Extensions/Foundation+Sendable.swift

7 lines · 381 bytes

1import Foundation
2
3// `UserDefaults` is documented as thread-safe but is not marked `Sendable` by
4// Foundation. Hutch passes it into account sessions and the various per-account
5// stores, all of which need to cross concurrency boundaries. The retroactive
6// unchecked conformance reflects the documented thread-safety.
7extension UserDefaults: @retroactive @unchecked Sendable {}