How to use closure with Core Data in Swift 6

Issue #1036 &#xA; Swift 6 makes concurrency safer by enforcing actor isolation at compile time, and sometimes at runtime. One of the subtler rules is that closures automatically inherit the actor isolation of the context where they are defined , not where they are called . This rule is mostly invisible until you pass a closure across a thread boundary and the app crashes. &#xA; The pattern shows…