mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-14 07:33:28 +01:00
Error messages about 'outside its designated queue' #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JoeMatt on GitHub (Oct 16, 2015).
My project is fairy simple at this point. I'm creating and calling my CoreStore from the main queue. As soon as I attempt to insert an object I'm seeing log messages about the wrong queue.
Here' sample code
Init code
Code to insert object
If I add a breakpoint to setSectionNavEntries, I'm confirmed call is coming from main thread.
If I break on CoreDataDataManagerAccessor.cacheStack, the first initialization is called from the main thread but is broken out into a dispatch_once. According to Apple, static var's are automatically wrapped and set in dispatch_once calls. Could this be the souce of the errors? It's the same pattern used in the demo code so I assumed this is safe.
@JoeMatt commented on GitHub (Oct 16, 2015):
I just realized the assert messages are meant to be used in conjunction with the result of condition. My mistake. Sometimes writing out an error report makes you catch your own mistake.