Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 207 Bytes

File metadata and controls

7 lines (5 loc) · 207 Bytes

#Get current thread

Use the below code to check whether the current thread is main thread.

NSLog​ (​NSThread​.isMainThread() ? ​"On main thread"​ : ​"Not on main thread"​)