Wow, this was as simple as adding a @Sendable keyword!
I posted about this last month here: https://forums.developer.apple.com/forums/thread/763790
I also submitted a bug report #FB15145734 as I assumed the block was being run on the incorrect thread which was out of our control.
Happy to have this working now, but I do wonder is this still an issue with the function, or simply a Swift 6 compiler issue?
Topic:
Programming Languages
SubTopic:
Swift
Tags: