如何识别线程的启动者

发布于 2024-12-04 19:35:50 字数 326 浏览 4 评论 0原文

可能的重复:
我可以获得当前线程生成的类和方法的名称吗?

是否有任何工具(可能是 javaagent)可以让我识别事件发生后启动线程的原因?

我有一个不会关闭的 Tomcat,并且线程名称(来自转储)没有多大用处。

Possible Duplicate:
Can I get the name of the class and method within which the current thread was spawned?

Are there any tools (perhaps a javaagent) that will let me identify what started a thread after the event?

I have a Tomcat that won't shut down, and the thread names (from the dump) aren't of much use.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如痴如狂 2024-12-11 19:35:50

堆栈跟踪的最低级别调用可能表明线程如何/为何启动......

The lowest level call of a stack trace might indicate how/why a thread was started...

街道布景 2024-12-11 19:35:50

做一件事, print堆栈跟踪,您将了解谁启动了该线程。

Do one thing, print the stack trace, and you will get who started the thread.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文