Skip to content

Instantly share code, notes, and snippets.

@quellish
Created August 9, 2014 20:09
Show Gist options
  • Save quellish/79f7d9869531238f09e7 to your computer and use it in GitHub Desktop.
Save quellish/79f7d9869531238f09e7 to your computer and use it in GitHub Desktop.
Pseudo-sample of synchronous use of Core Data performBlock: using dispatch group
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);
@MaxHasADHD
Copy link

If this ever worked, it doesn't seem to work anymore. Just waits forever :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment