When I send a performBlock
message to my MOC of type NSPrivateQueueConcurrencyType
, like this:
[self.privateManagedObjectContext pe
This optimization is possible because performBlockAndWait:
executes the block
synchronously, i.e. the method does not return until the block has finished.
Therefore the block will not be executed in parallel with other operations on
the main thread.
(For the same reason, dispatch_sync(queue, ...)
may execute a block on the main thread
instead of a separate thread.)