Question

I've got a simple project using magical record to store values.

I was curious if I had some code that was in this order would it execute sequentially or if there was a chance it would not due to any asyn function going on in the background with magical record and core data.

[MeetingTypes MR_truncateAllInContext:localContext];

MeetingTypes *oMeetingTypes = [MeetingTypes MR_createInContext:localContext]; 
[localContext MR_saveToPersistentStoreAndWait];
Was it helpful?

Solution

There is no async code you need to worry about in any of those calls -- assuming that there isn't any missing code in your example that dispatches another work queue or other context.

You can inspect the source quite readily to assure yourself that it isn't dispatching MR_truncateAllInContext: or MR_createInContext: asynchronously.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top