Skip to content

Instantly share code, notes, and snippets.

@irskep
Created March 2, 2018 06:11
Show Gist options
  • Save irskep/5e948cd1095cfa5bb2a83fa4529503ba to your computer and use it in GitHub Desktop.
Save irskep/5e948cd1095cfa5bb2a83fa4529503ba to your computer and use it in GitHub Desktop.
// do some stuff...
func test() {
DispatchQueue.main.async {
print(Thread.isMainThread)
exit(0)
}
}
test()
dispatchMain()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment