Created
August 14, 2015 20:46
-
-
Save tupakapoor/831a886afa423a73b6da to your computer and use it in GitHub Desktop.
Async then Sync macro
This file contains 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
#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