Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Callback handler for save operation is dispatched asynchronously #685

sbhklr opened this Issue · 3 comments

2 participants


Is there a reason why the completion block for the magical saves is dispatched asynchronously to the main queue instead of dispatch_sync even when specifying the MRSaveSynchronously option? The way it is now, it is not possible to do a synchronous save and check for saving errors immediately. e.g.

__block NSError* savingError;
[moc MR_saveWithOptions:MRSaveParentContexts | MRSaveSynchronously completion:^(BOOL success, NSError *error) {
        savingError = error;
return savingError == nil;

Honestly, because dispatch_sync usually ends with computers out of windows. I'll add it to the list to investigate for 3.0 — thanks!

@tonyarnold tonyarnold was assigned by sbhklr

I investigate fast. You can see the commit to the upcoming MagicalRecord 3.0 branch above. Thanks!

@tonyarnold tonyarnold closed this

Nice, thank you for your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.