objective c - NSManagedObjectContext performBlockAndWait causing deadlock when called from two threads -


i have osx app i'm using parent/child nsmanagedobjectcontext setup. child moc has nsprivatequeueconcurrencytype , 1 i'm using. parent set nsmainqueueconcurrencytype

when call performblockandwait on child context background thread @ same time called main thread deadlock – semaphore_wait_trap. pausing debugger shows both threads stuck @ performblockandwait

how can around this? thought method designed situation , queue blocks on context's private queue return appropriately?

i worked around creating serial queue , doing performblock calls through make sure wouldn't mess each-other up. honestly, i'm not sure if practice did solve problem particular situation.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -