From 33e3e4e7be47e4ea5c4c0865ee9f8585c5918ba1 Mon Sep 17 00:00:00 2001 From: Christopher Thielen <77445+cthielen@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:58:50 -0700 Subject: [PATCH] NotificationCenter.messages() should return Sendable type --- .../NotificationCenter/AsyncMessage+AsyncSequence.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/FoundationEssentials/NotificationCenter/AsyncMessage+AsyncSequence.swift b/Sources/FoundationEssentials/NotificationCenter/AsyncMessage+AsyncSequence.swift index aedab64d0..41eac0e7c 100644 --- a/Sources/FoundationEssentials/NotificationCenter/AsyncMessage+AsyncSequence.swift +++ b/Sources/FoundationEssentials/NotificationCenter/AsyncMessage+AsyncSequence.swift @@ -34,7 +34,7 @@ extension NotificationCenter { of subject: Message.Subject, for identifier: Identifier, bufferSize limit: Int = 10 - ) -> some AsyncSequence where Identifier.MessageType == Message, Message.Subject: AnyObject { + ) -> some AsyncSequence & Sendable where Identifier.MessageType == Message, Message.Subject: AnyObject { return AsyncMessageSequence(self, subject, limit) } @@ -48,7 +48,7 @@ extension NotificationCenter { of subject: Message.Subject.Type, for identifier: Identifier, bufferSize limit: Int = 10 - ) -> some AsyncSequence where Identifier.MessageType == Message { + ) -> some AsyncSequence & Sendable where Identifier.MessageType == Message { return AsyncMessageSequence(self, nil, limit) } @@ -62,7 +62,7 @@ extension NotificationCenter { of subject: Message.Subject? = nil, for messageType: Message.Type, bufferSize limit: Int = 10 - ) -> some AsyncSequence where Message.Subject: AnyObject { + ) -> some AsyncSequence & Sendable where Message.Subject: AnyObject { return AsyncMessageSequence(self, subject, limit) } }