Skip to content

Instantly share code, notes, and snippets.

@quellish
Created August 9, 2014 20:09
Show Gist options
  • Select an option

  • Save quellish/79f7d9869531238f09e7 to your computer and use it in GitHub Desktop.

Select an option

Save quellish/79f7d9869531238f09e7 to your computer and use it in GitHub Desktop.

Revisions

  1. quellish created this gist Aug 9, 2014.
    7 changes: 7 additions & 0 deletions waitForBlock.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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);