Created
October 4, 2011 04:23
-
-
Save alanjrogers/1260899 to your computer and use it in GitHub Desktop.
Question regarding private queue concurrency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__block NSManagedObject* object = nil; | |
[privateQueueContext performBlockAndWait:^{ | |
object = [SomeClass methodThatExecutesFetchRequestReturningObjectUsingContext:privateQueueContext]; | |
}]; | |
// Is it safe to use object here? | |
NSLog(@"object: %@", object); |
I think you're correct, using the managed object outside that block violates the containment protocol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current answer is: "probably not" ;)