diff --git a/Sources/Atomics/AtomicLazyReference.swift.gyb b/Sources/Atomics/AtomicLazyReference.swift.gyb index f7b448e..61d03c3 100644 --- a/Sources/Atomics/AtomicLazyReference.swift.gyb +++ b/Sources/Atomics/AtomicLazyReference.swift.gyb @@ -47,6 +47,11 @@ public struct UnsafeAtomicLazyReference { } } +#if compiler(>=5.5) && canImport(_Concurrency) +extension UnsafeAtomicLazyReference: @unchecked Sendable +where Instance: Sendable {} +#endif + extension UnsafeAtomicLazyReference { /// The storage representation for an atomic lazy reference value. @frozen diff --git a/Sources/Atomics/HighLevelTypes.swift.gyb b/Sources/Atomics/HighLevelTypes.swift.gyb index b986f34..799a57e 100644 --- a/Sources/Atomics/HighLevelTypes.swift.gyb +++ b/Sources/Atomics/HighLevelTypes.swift.gyb @@ -71,6 +71,10 @@ public struct UnsafeAtomic { } } +#if compiler(>=5.5) && canImport(_Concurrency) +extension UnsafeAtomic: @unchecked Sendable where Value: Sendable {} +#endif + /// A reference type holding an atomic value, with automatic memory management. @_fixed_layout public class ManagedAtomic { diff --git a/Sources/Atomics/autogenerated/AtomicLazyReference.swift b/Sources/Atomics/autogenerated/AtomicLazyReference.swift index 1184a7e..fdef07d 100644 --- a/Sources/Atomics/autogenerated/AtomicLazyReference.swift +++ b/Sources/Atomics/autogenerated/AtomicLazyReference.swift @@ -50,6 +50,11 @@ public struct UnsafeAtomicLazyReference { } } +#if compiler(>=5.5) && canImport(_Concurrency) +extension UnsafeAtomicLazyReference: @unchecked Sendable +where Instance: Sendable {} +#endif + extension UnsafeAtomicLazyReference { /// The storage representation for an atomic lazy reference value. @frozen diff --git a/Sources/Atomics/autogenerated/HighLevelTypes.swift b/Sources/Atomics/autogenerated/HighLevelTypes.swift index 6551cae..3b67afc 100644 --- a/Sources/Atomics/autogenerated/HighLevelTypes.swift +++ b/Sources/Atomics/autogenerated/HighLevelTypes.swift @@ -73,6 +73,10 @@ public struct UnsafeAtomic { } } +#if compiler(>=5.5) && canImport(_Concurrency) +extension UnsafeAtomic: @unchecked Sendable where Value: Sendable {} +#endif + /// A reference type holding an atomic value, with automatic memory management. @_fixed_layout public class ManagedAtomic {