-
-
Save lemonkey/68bf8c3fadbb84663c47892f56f1a5a2 to your computer and use it in GitHub Desktop.
Pseudo-sample of synchronous use of Core Data performBlock: using dispatch group
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
group = dispatch_group_create(); | |
dispatch_group_enter(group); | |
[context performBlock:^{ | |
result = [context executeFetch:... | |
dispatch_group_leave(group); | |
}]; | |
groupResult = dispatch_group_wait(group, DISPATCH_TIME_FOREVER); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment