Skip to content

Instantly share code, notes, and snippets.

@theoknock
Last active August 22, 2020 21:23
Show Gist options
  • Save theoknock/51465e17edde617a0cac97d62298c4c5 to your computer and use it in GitHub Desktop.
Save theoknock/51465e17edde617a0cac97d62298c4c5 to your computer and use it in GitHub Desktop.
Block literals as parameters to an enclosing block as a substitute for dispatch groups, allowing synchronization of an aggregate of tasks. There are two task aggregates: one supplies the value for d1; the other, c2; They are notated by 1 and 2, respectively; the letters (a through d, a through c) mark the progression of the tasks in each aggregate.
^(int d1, int(^c2)(void))
{
return c2;
} (^(int c1)
{
return c1;
} (^(int b1)
{
return b1;
} (a1)),
^(int b2)
{
return ^{
return b2;
};
} (a2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment