mirror of
https://github.com/apple/swift-nio-extras
synced 2026-11-29 05:24:21 +00:00
Adopt Sendable in NIOExtras (#174)
Incremental `Sendable` adoption. Co-authored-by: Cory Benfield <lukasa@apple.com>
This commit is contained in:
1 parent
b64e59956e
commit
5334d949fe
11 files changed
+58
-1
No files matched your search
@@ -174,3 +174,8 @@ public class DebugInboundEventsHandler: ChannelInboundHandler {
|
||||
fflush(stdout)
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension DebugInboundEventsHandler: Sendable {}
|
||||
#endif
|
||||
@@ -170,3 +170,8 @@ public class DebugOutboundEventsHandler: ChannelOutboundHandler {
|
||||
fflush(stdout)
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension DebugOutboundEventsHandler: Sendable {}
|
||||
#endif
|
||||
@@ -76,3 +76,8 @@ public final class FixedLengthFrameDecoder: ByteToMessageDecoder {
|
||||
return .needMoreData
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension FixedLengthFrameDecoder: Sendable {}
|
||||
#endif
|
||||
@@ -214,3 +214,13 @@ extension String {
|
||||
return self[firstElementIndex ..< lastElementIndex.base]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension NIOJSONRPCFraming.ContentLengthHeaderFrameDecoder: Sendable {}
|
||||
|
||||
@available(*, unavailable)
|
||||
extension NIOJSONRPCFraming.ContentLengthHeaderFrameEncoder: Sendable {}
|
||||
#endif
|
||||
@@ -246,3 +246,8 @@ public final class LengthFieldBasedFrameDecoder: ByteToMessageDecoder {
|
||||
return frameLength
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension LengthFieldBasedFrameDecoder: Sendable {}
|
||||
#endif
|
||||
@@ -144,3 +144,8 @@ public final class LengthFieldPrepender: ChannelOutboundHandler {
|
||||
context.write(data, promise: promise)
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension LengthFieldPrepender: Sendable {}
|
||||
#endif
|
||||
@@ -91,3 +91,8 @@ public class LineBasedFrameDecoder: ByteToMessageDecoder {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension LineBasedFrameDecoder: Sendable {}
|
||||
#endif
|
||||
@@ -12,8 +12,10 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import NIOCore
|
||||
|
||||
/// A struct to describe the length of a piece of data in bits
|
||||
public struct NIOLengthFieldBitLength {
|
||||
public struct NIOLengthFieldBitLength: NIOSendable {
|
||||
internal enum Backing {
|
||||
case bits8
|
||||
case bits16
|
||||
|
||||
@@ -96,3 +96,8 @@ public class NIOPCAPRingBuffer {
|
||||
return toReturn
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension NIOPCAPRingBuffer: Sendable {}
|
||||
#endif
|
||||
@@ -119,3 +119,8 @@ public final class RequestResponseHandler<Request, Response>: ChannelDuplexHandl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension RequestResponseHandler: Sendable {}
|
||||
#endif
|
||||
@@ -290,6 +290,11 @@ public class NIOWritePCAPHandler: RemovableChannelHandler {
|
||||
}
|
||||
}
|
||||
|
||||
#if swift(>=5.6)
|
||||
@available(*, unavailable)
|
||||
extension NIOWritePCAPHandler: Sendable {}
|
||||
#endif
|
||||
|
||||
extension NIOWritePCAPHandler: ChannelDuplexHandler {
|
||||
public typealias InboundIn = ByteBuffer
|
||||
public typealias InboundOut = ByteBuffer
|
||||
|
||||
Reference in new issue
Block a user