Hi all,
I just wanted to ask how people were using ModelActor with the Swift 6 language mode enabled. My current implementation involves passing the ModelContainer to my ModelActor, which worked in Sonoma and previous betas of Sequoia, however in the current Beta 3, I get this error:
"Sending 'self.modelContext.container' risks causing data races"
I am a bit confused by this, as from what I understand, ModelContainer conforms to Sendable, so ideally this error should not be thrown. Is this a bug in Beta 3?
Thanks in advance.
Yes, this is a bug in Beta 3. There is a similar discussion in the swift forums: https://forums.swift.org/t/why-does-sending-a-sendable-value-risk-causing-data-races/73074