Last active
December 14, 2015 14:59
-
-
Save larryaasen/5104501 to your computer and use it in GitHub Desktop.
A simple C function to submit a block for asynchronous execution on the main queue (main thread).
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
void dispatch_async_on_main_queue(dispatch_block_t block); | |
/* | |
* Submits a block for asynchronous execution on the main queue (main thread). | |
*/ | |
void dispatch_async_on_main_queue(dispatch_block_t block) | |
{ | |
dispatch_async(dispatch_get_main_queue(), block); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment