Skip to content

Instantly share code, notes, and snippets.

@tokizuoh
Created March 16, 2024 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tokizuoh/ccb303d02941ccbd1e6dc74b7523c491 to your computer and use it in GitHub Desktop.
Save tokizuoh/ccb303d02941ccbd1e6dc74b7523c491 to your computer and use it in GitHub Desktop.
import UIKit
func hello() async {
print(Thread.isMainThread) // true or false?
}
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
Task.init {
await hello()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment