Mark types explicitly non sendable (#2290)

This commit is contained in:
David Nadoba 2022-10-13 13:21:28 +01:00 committed by GitHub
parent 8bb20eb44b
commit 1d4dc231f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -82,6 +82,11 @@ public struct FileRegion {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension FileRegion: Sendable {}
#endif
extension FileRegion {
/// Create a new `FileRegion` forming a complete file.
///

View File

@ -30,6 +30,11 @@ public enum IOData {
/// `IOData` objects are comparable just like the values they wrap.
extension IOData: Equatable {}
#if swift(>=5.6)
@available(*, unavailable)
extension IOData: Sendable {}
#endif
/// `IOData` provide a number of readable bytes.
extension IOData {
/// Returns the number of readable bytes in this `IOData`.

View File

@ -257,6 +257,11 @@ public struct NIOAny {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension NIOAny: Sendable {}
#endif
extension NIOAny: CustomStringConvertible {
public var description: String {
return "NIOAny { \(self.asAny()) }"