We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大神你好.拜读代码和博客,写的都非常详细,对我帮助很大.十分感谢~ 现在有个小问题:代码173行和179行有两次主线程判断,能否解释一下为什么这样做?是有什么特殊的处理吗? 个人理解第一个主线程判断 return 掉以后,第二个判断应该是走不到的. 望解答~
if ([nsthread isMainThread]) { return (thread_t)main_thread_id; } for (int i = 0; i < count; ++i) { pthread_t pt = pthread_from_mach_thread_np(list[i]); if ([nsthread isMainThread]) { if (list[i] == main_thread_id) { return list[i]; } } if (pt) { name[0] = '\0'; pthread_getname_np(pt, name, sizeof name); if (!strcmp(name, [nsthread name].UTF8String)) { [nsthread setName:originName]; return list[i]; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
大神你好.拜读代码和博客,写的都非常详细,对我帮助很大.十分感谢~
现在有个小问题:代码173行和179行有两次主线程判断,能否解释一下为什么这样做?是有什么特殊的处理吗?
个人理解第一个主线程判断 return 掉以后,第二个判断应该是走不到的.
望解答~
The text was updated successfully, but these errors were encountered: