Skip to content

Instantly share code, notes, and snippets.

@StanislavK
Created January 26, 2017 15:57
Show Gist options
  • Save StanislavK/b725d9a9eb629d689f6ea74b7e84c97a to your computer and use it in GitHub Desktop.
Save StanislavK/b725d9a9eb629d689f6ea74b7e84c97a to your computer and use it in GitHub Desktop.
func log(message: String) {
let thread = Thread.current.isMainThread ? "Main" : "Background"
print("\(thread) thread: \(message)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment