iPhone:如何确定线程是否是主线程? [英] iPhone: How to determine if thread is main thread?
本文介绍了iPhone:如何确定线程是否是主线程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何确定方法中的当前线程是主线程,还是只是异步创建的线程? ID是否告诉我?
How to determine if the current thread inside a method is a main thread, or just a thread that is asynchronous and created? Does the ID tell me?
推荐答案
喜欢这样: [NSThread isMainThread]
这篇关于iPhone:如何确定线程是否是主线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文