1

I have an NSOperationQueue that is serial and maxConcurrentOperationCount is set to 1.

I'm creating many operations to process data for CoreData entity modifications.

Inside of the [NSBlockOperation blockOperationWithBlock:^{ I create a child managed object context off of my main context using the NSPrivateQueueConcurrencyType and correctly assign the parentContext

Is it then safe in the completionBlock of the NSBlockOperation to save the parent context on the main thread ?

Can an NSOperation completionBlock run while the next operation begins its "main task" ?

cynistersix
  • 1,215
  • 1
  • 16
  • 30
  • You should try https://github.com/bignerdranch/CoreDataStack. I use it to save private contexts in NSOperations. – GaétanZ Sep 16 '16 at 18:55

0 Answers0