exp
exp copied to clipboard
"热插拔",有进行资源监管么,例如线程引用导致的class未从jvm内存中清除呢
想问问这个有没有进行处理呢,我尝试在tomcat热部署一个应用,这个应用中启动了一个有while(true)块的代码,在卸载应用时tomcat只是给出了警告(它正确获取这个线程,并提示未能停止它),大致看了下org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads它是通过获取线程组下所有子线程的方式,既然能获取到,意味着这是可以解决的问题。不过从现有认知上感觉可能会存在一些不可以预料的错杀问题。
插件卸载时,线程需要关闭 Dlinw @.***>于2025年3月20日 周四16:42写道:
想问问这个有没有进行处理呢,我尝试过tomcat,但tomcat只是给出了警告,大致看了下org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads它是通过获取线程组下所有子线程的方式,意味着这是可以解决的问题,不过从意识上感觉可能会存在一些不可以预料的错杀问题(但就从java Thread实现上看到,所有线程之间都是有关联的的)
— Reply to this email directly, view it on GitHub https://github.com/stateIs0/exp/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF6RAMHYC2PAPDOOJTYGLMD2VJ5PXAVCNFSM6AAAAABZM2KHH6VHI2DSMVQWIX3LMV43ASLTON2WKOZSHEZTINJUG4YTGMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***> [image: Dlinw]Dlinw created an issue (stateIs0/exp#33) https://github.com/stateIs0/exp/issues/33
想问问这个有没有进行处理呢,我尝试过tomcat,但tomcat只是给出了警告,大致看了下org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads它是通过获取线程组下所有子线程的方式,意味着这是可以解决的问题,不过从意识上感觉可能会存在一些不可以预料的错杀问题(但就从java Thread实现上看到,所有线程之间都是有关联的的)
— Reply to this email directly, view it on GitHub https://github.com/stateIs0/exp/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF6RAMHYC2PAPDOOJTYGLMD2VJ5PXAVCNFSM6AAAAABZM2KHH6VHI2DSMVQWIX3LMV43ASLTON2WKOZSHEZTINJUG4YTGMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
卸载的时候,插件的Bean都能卸载干净吗