Mark FixedLengthFrameDecoder non-Sendable

This commit is contained in:
David Nadoba 2022-08-23 15:21:10 +02:00
parent 572c1cb16c
commit daae52ce76

View File

@ -28,17 +28,14 @@ import NIOCore
/// | ABC | DEF | GHI | /// | ABC | DEF | GHI |
/// +-----+-----+-----+ /// +-----+-----+-----+
/// ///
public final class FixedLengthFrameDecoder: ByteToMessageDecoder, NIOSendable { public final class FixedLengthFrameDecoder: ByteToMessageDecoder {
/// Data type we receive. /// Data type we receive.
public typealias InboundIn = ByteBuffer public typealias InboundIn = ByteBuffer
/// Data type we send to the next stage. /// Data type we send to the next stage.
public typealias InboundOut = ByteBuffer public typealias InboundOut = ByteBuffer
@available(*, deprecated, message: "No longer used") @available(*, deprecated, message: "No longer used")
public var cumulationBuffer: ByteBuffer? { public var cumulationBuffer: ByteBuffer?
get { nil }
set { /* discard newValue */ }
}
private let frameLength: Int private let frameLength: Int
@ -79,3 +76,8 @@ public final class FixedLengthFrameDecoder: ByteToMessageDecoder, NIOSendable {
return .needMoreData return .needMoreData
} }
} }
#if swift(>=5.6)
@available(*, unavailable)
extension FixedLengthFrameDecoder: Sendable {}
#endif