Declared in NSManagedObjectContext+MagicalChainSave.h

Tasks

  • – MR_saveWithBlock:

    Creates a child context for the current context that you can make changes within, before saving up through all parent contexts to the main queue context, and finally to the saving context. This method will return immediately, and execute the save initially on a background thread, and then on the appropriate thread for each context it saves.

  • – MR_saveWithBlock:completion:

    Creates a child context for the current context that you can make changes within, before saving up through all parent contexts to the main queue context, and finally to the saving context. This method will return immediately, and execute the save initially on a background thread, and then on the appropriate thread for each context it saves.

  • – MR_saveWithBlockAndWait:

    Creates a child context for the current context that you can make changes within, before saving up through all parent contexts to the main queue context, and finally to the saving context. This method will not return until the save has completed, blocking the thread it is called on.

Instance Methods

MR_saveWithBlock:

- (void)MR_saveWithBlock:(void ( ^ ) ( NSManagedObjectContext *localContext ))block
Discussion

Creates a child context for the current context that you can make changes within, before saving up through all parent contexts to the main queue context, and finally to the saving context. This method will return immediately, and execute the save initially on a background thread, and then on the appropriate thread for each context it saves.

Parameters

block

Block that is passed a managed object context.

Declared In

NSManagedObjectContext+MagicalChainSave.h

MR_saveWithBlock:completion:

- (void)MR_saveWithBlock:(void ( ^ ) ( NSManagedObjectContext *localContext ))block completion:(MRSaveCompletionHandler)completion
Discussion

Creates a child context for the current context that you can make changes within, before saving up through all parent contexts to the main queue context, and finally to the saving context. This method will return immediately, and execute the save initially on a background thread, and then on the appropriate thread for each context it saves.

Parameters

block

Block that is passed a managed object context.

completion

Completion block that is called once all contexts have been saved, or if an error is encountered.

Declared In

NSManagedObjectContext+MagicalChainSave.h

MR_saveWithBlockAndWait:

- (void)MR_saveWithBlockAndWait:(void ( ^ ) ( NSManagedObjectContext *localContext ))block
Discussion

Creates a child context for the current context that you can make changes within, before saving up through all parent contexts to the main queue context, and finally to the saving context. This method will not return until the save has completed, blocking the thread it is called on.

Parameters

block

Block that is passed a managed object context.

Declared In

NSManagedObjectContext+MagicalChainSave.h