From f554552edf14e333a7d850ca73f07d70cb38f4ee Mon Sep 17 00:00:00 2001 From: David Nadoba Date: Fri, 17 Jun 2022 15:38:06 +0200 Subject: [PATCH] Adopt `Sendable` in `NIOEmbedded` (#2195) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `EmbeddedChannel` and `EmbeddedEventLoop` should not be `Sendable`. However, they inherit from `Channel` and `EventLoop` respectively. Therfore, they need to be `Sendable` (and are already implcitily `Sendable`. Given these constraints, we can’t mark `EmbeddedChannel` and `EmbeddedEventLoop` as non-Sendable. --- Sources/NIOEmbedded/Embedded.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/NIOEmbedded/Embedded.swift b/Sources/NIOEmbedded/Embedded.swift index a38bf3b58..f0e4a3cfc 100644 --- a/Sources/NIOEmbedded/Embedded.swift +++ b/Sources/NIOEmbedded/Embedded.swift @@ -761,3 +761,8 @@ extension EmbeddedChannel { return SynchronousOptions(channel: self) } } + +#if swift(>=5.6) +@available(*, unavailable) +extension EmbeddedChannel.SynchronousOptions: Sendable {} +#endif