Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Callback handler for save operation is dispatched asynchronously #685

Closed
sbhklr opened this Issue · 3 comments

2 participants

@sbhklr

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;
@tonyarnold
Owner

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
@tonyarnold
Owner

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

@tonyarnold tonyarnold closed this
@sbhklr

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.