Skip to content

Instantly share code, notes, and snippets.

@tupakapoor
Created August 14, 2015 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tupakapoor/831a886afa423a73b6da to your computer and use it in GitHub Desktop.
Save tupakapoor/831a886afa423a73b6da to your computer and use it in GitHub Desktop.
Async then Sync macro
#define dispatchAsyncThenSync(asyncBlock, syncBlock) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ \
asyncBlock(); \
dispatch_async(dispatch_get_main_queue(), ^{ syncBlock(); }); \
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment