From 3ea78dd97da0941baacda1a278b6bfe10eeaa405 Mon Sep 17 00:00:00 2001 From: fumoboy007 <2100868+fumoboy007@users.noreply.github.com> Date: Thu, 19 Jan 2023 00:57:42 -0800 Subject: [PATCH 1/2] Mark `MessagePackTimestamp` as `Sendable`. `MessagePackTimestamp` can be marked `Sendable` (a.k.a. thread-safe) because it is a value type. Marking the type as `Sendable` will allow values of that type to be passed across concurrency domains. --- Sources/MessagePackTimestamp.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/MessagePackTimestamp.swift b/Sources/MessagePackTimestamp.swift index 94f2e7b..3d83f80 100644 --- a/Sources/MessagePackTimestamp.swift +++ b/Sources/MessagePackTimestamp.swift @@ -67,3 +67,8 @@ extension MessagePackTimestamp: MessagePackable { return try MessagePackTimestamp(extension: ext) } } + +#if swift(>=5.7) +extension MessagePackTimestamp: Sendable { +} +#endif From 26c591029cac1cd9e9fb4adf5821bee8687979c1 Mon Sep 17 00:00:00 2001 From: fumoboy007 <2100868+fumoboy007@users.noreply.github.com> Date: Thu, 19 Jan 2023 00:59:53 -0800 Subject: [PATCH 2/2] Mark `MessagePackExtension` as `Sendable`. `MessagePackExtension` can be marked `Sendable` (a.k.a. thread-safe) because it is a value type. Marking the type as `Sendable` will allow values of that type to be passed across concurrency domains. --- Sources/MessagePackExtension.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/MessagePackExtension.swift b/Sources/MessagePackExtension.swift index a5a6939..cd6af08 100644 --- a/Sources/MessagePackExtension.swift +++ b/Sources/MessagePackExtension.swift @@ -52,3 +52,8 @@ extension MessagePackExtension: MessagePackable { return try MessagePackType.ExtensionType.unpack(for: value) } } + +#if swift(>=5.7) +extension MessagePackExtension: Sendable { +} +#endif