I have two threads working in my application.
- In the main thread, I update the key values ββin the entity or get some rows from Core Data.
- In the background thread, I am loading data from the server.
But several times when updating / processing master data on [managedObjectContext executeFetchRequest:request error:&error]
... I get:
#0 0x34507c5c in semaphore_wait_signal_trap ()
#1 0x34507f58 in semaphore_wait_signal ()
#2 0x364d573a in pthread_mutex_lock () #3 0x35c91a2e in -[_PFLock lock] () #4 0x35c91a12 in -[NSPersistentStoreCoordinator lock] () #5 0x35c919e8 in -[NSManagedObjectContext(_NSInternalAdditions) lockObjectStore] () #6 0x35c90676 in -[NSManagedObjectContext executeFetchRequest:error:] ()
How is NSManagedObjectContext blocked? What can I do for this?
source share