how to find out who create a thread in java?

后端 未结 4 1355
鱼传尺愫
鱼传尺愫 2020-12-29 15:13

in tomcat,if a webapp did stop a none daemon thread,tomcat can not be shutdown by shutdown.sh

for example:

public class demo implements ServletContex         


        
4条回答
  •  余生分开走
    2020-12-29 15:29

    You can also write a tiny java Instrumentation agent to wrap the thread constructor (and stack dump there), instead of trying to mod the rt.jar classes.

提交回复
热议问题