Last active
December 27, 2015 14:59
-
-
Save kaishin/7344142 to your computer and use it in GitHub Desktop.
My concurrency homie. Sprinkle some of it inside and around your blocks and concurrency will never come back to haunt you again.
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
NSLog([NSThread currentThread] == [NSThread mainThread] ? @"❇️ Main thread, it is." : @"♒️ Doesn't look like main thread around here..."); |
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
func threadCheck() { | |
println(NSThread.currentThread() == NSThread.mainThread() ? "❇️ Main thread, it is." : "♒️ Doesn't look like main thread around here...") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment