The question pretty much covers it all. If I put in N blocks into the queue for the NSManagedObjectContext, will it perform them all in order, guaranteed, or is there a chance that some of them might get scrambled?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I see no reason why NSManagedObjectContext wouldn’t use GCD internally, and GCD queues are strictly FIFO. Of course I have no proof to confirm this, but it makes perfect sense to me since the goal of
performBlockis thread safety, and performing only one operation at once in a given context, and why would Apple bother writing a system from the ground up when a perfectly functional one (GCD) already exists.