CoreStore seems breaking Core Data multi thread requirements #416

Closed
opened 2025-12-29 15:31:18 +01:00 by adam · 2 comments
Owner

Originally created by @kukushi on GitHub (Jul 26, 2023).

After adding -com.apple.CoreData.ConcurrencyDebug 1 in launch arguments, playing around the demo, and soon the Xcode will stop at CoreData +[NSManagedObjectContext __Multithreading_Violation_AllThatIsLeftToUsIsHonor__]:.

SCR-20230727-dffq

It seems that some methods don't follow the Managed objects retrieved from a context are bound to the same queue that the context is bound to. rule mentioned in apple's doc.

I wonder if it's safe to ignore that assertion or just an unintended result.

Originally created by @kukushi on GitHub (Jul 26, 2023). After adding `-com.apple.CoreData.ConcurrencyDebug 1` in launch arguments, playing around the demo, and soon the Xcode will stop at `CoreData +[NSManagedObjectContext __Multithreading_Violation_AllThatIsLeftToUsIsHonor__]:`. <img width="1702" alt="SCR-20230727-dffq" src="https://github.com/JohnEstropia/CoreStore/assets/2424654/4a858917-ad7d-4fa3-8079-7532e81d8a56"> It seems that some methods don't follow the `Managed objects retrieved from a context are bound to the same queue that the context is bound to.` rule mentioned in [apple's doc](https://developer.apple.com/documentation/coredata/using_core_data_in_the_background). I wonder if it's safe to ignore that assertion or just an unintended result.
adam closed this issue 2025-12-29 15:31:18 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Jul 27, 2023):

@kukushi Hi, this is safe to ignore because CoreStore manages context queueing for you.
See the Installation section of the README

To elaborate on what's happening here, this queue that you see an assertion being raised from is actually executed in the same thread that the NSManagedContext queue belongs to.

@JohnEstropia commented on GitHub (Jul 27, 2023): @kukushi Hi, this is safe to ignore because CoreStore manages context queueing for you. See the [Installation section of the README](https://github.com/JohnEstropia/CoreStore#installation) To elaborate on what's happening here, this queue that you see an assertion being raised from is actually executed in the same thread that the `NSManagedContext` queue belongs to.
Author
Owner

@kukushi commented on GitHub (Jul 29, 2023):

@kukushi Hi, this is safe to ignore because CoreStore manages context queueing for you. See the Installation section of the README

To elaborate on what's happening here, this queue that you see an assertion being raised from is actually executed in the same thread that the NSManagedContext queue belongs to.

Got it. Thanks for your quick response!

@kukushi commented on GitHub (Jul 29, 2023): > @kukushi Hi, this is safe to ignore because CoreStore manages context queueing for you. See the [Installation section of the README](https://github.com/JohnEstropia/CoreStore#installation) > > To elaborate on what's happening here, this queue that you see an assertion being raised from is actually executed in the same thread that the `NSManagedContext` queue belongs to. Got it. Thanks for your quick response!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#416