Created
October 15, 2015 14:32
-
-
Save badgercl/9c295d43c384a4ef0249 to your computer and use it in GitHub Desktop.
Dispatch on main thread (Objective-c)
This file contains hidden or 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 bg_dispatch_main_async_safe(block)\ | |
| if ([NSThread isMainThread]) {\ | |
| block();\ | |
| } else {\ | |
| dispatch_async(dispatch_get_main_queue(), block);\ | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From SDWebImage