RestKit/RestKit — pull request #2011 by DaGaMs (2014-08-19 19:12:47+00:00)
Title: Fixes a "Collection was mutated while being enumerated" error

I regularly encountered a crash while saving a MOC. This, as far as I can tell, stems from background threads calling `[context performBlock:]` while another thread is saving. Those concurrent saves would lead to a `*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection was mutated while being enumerated.'` error. Encapsulating the `obtainPermanentIDsForObjects:` in a `performBlockAndWait:` seems to fix this problem.