获取当前方法调用的线程ID [英] Getting thread id of current method call

查看:153
本文介绍了获取当前方法调用的线程ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法打印当前方法执行的当前线程ID?

Is there a way to print out the current thread id on which the current method is executing on?

(目标c)

(objective-c please)

推荐答案

NSLog(@"%@", [NSThread currentThread]);

这篇关于获取当前方法调用的线程ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆