If you followed my work on SwiftData and Concurrency, you'll be happy to know I've published the portion used in Bushel as a Swift Package.
Introducing DataThespian!
A thread-safe SwiftData implementation that uses the power of ModelActors to provide an optimized and type-safe database interface.
https://github.com/brightdigit/DataThespian
=> More informations about this toot | More toots from leogdion@c.im
@leogdion I’m curious about the claim that you must use a single context for your entire app. With CoreData and SwiftData there are patterns where you may want to create a scratch context to do work (editable forms you can cancel, background data imports, etc.)
=> More informations about this toot | More toots from bens@mastodon.xyz
@bens I'm sure in CoreData but I don't believe that's supported in SwiftData yet.
If you create a model using one ModelContext the app will crash if you use a different one.
=> More informations about this toot | More toots from leogdion@c.im
@leogdion you can’t mix models, but you can pass around ids and refresh in a different context
=> More informations about this toot | More toots from bens@mastodon.xyz This content has been proxied by September (3851b).Proxy Information
text/gemini