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" ?