!threads 命令显示 XXX 线程 ID
当我运行 !threads 命令时,在最左边的几列中,我看到 id 为 XXX。我的理解是这意味着死线程。这是否包括任何退出(正常或不正常)的线程,还是任何未正常退出并通过 Abort 或 Interrupt 等 API 终止的线程
When I run the !threads command, in the left most columns for few threads i see id as XXX. My understanding is that this mean dead threads. Does this includes any threads that exited (gracefully or ungracefully) or is it for any threads that didn't exit gracefully and were killed via APIs like Abort or Interrupt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是对的,标记为 XXXX 的线程是死线程 - 即从操作系统的角度来看它们不再存在。 CLR 保留有关线程的信息的时间比 OS 长一些,这就是为什么您会在输出中看到死线程。
是的,正常终止和强制终止的线程都在输出中显示为 XXXX。
You are right, threads marked as XXXX are dead threads - i.e. they are no longer exist from the prospective of OS. CLR keeps information about threads a bit longer than OS, that is why you see dead threads in output.
Yes, both normally terminated and forcibly killed threads appear with XXXX in output.