문제

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];
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top