ios - Reading CoreData managed objects on background thread -
i know coredata not thread safe, , need 1 moc per thread, , using 2 threads (one process incoming updates, 1 feed ui) but... ok read object on different thread like:
nsmanagedobject *mo = fetch object dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_background, 0), ^{ loop on objects in relation, fetch data , cache it.... });
where dispatch_queue_priority_background
1 of default, low, high. i'm getting strange behaviour , perhaps should not doing any background work, if read-only, managed object.
if should not doing this, suggestions on how it? create temporary moc dispatch_async
block?
Comments
Post a Comment