Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

线程池监听统计调度线程使用非守护线程是否会存在应用停止时无法正常关闭? #1244

Open
lveliu opened this issue Sep 6, 2023 · 1 comment

Comments

@lveliu
Copy link

lveliu commented Sep 6, 2023

在 ThreadPoolGovernor 中 创建了线程池监听调度线程池 monitorScheduler,monitorScheduler 的线程创建是通过 new NamedThreadFactory("SOFA-Thread-Pool-Monitor") 进行处理,在 NamedThreadFactory 默认构造方法中
public NamedThreadFactory(String name) {
this(name, false);
}创建的是非守护进程,在外部也未发现 monitorScheduler 调用shutdown方法,请问在应用正常stop时是否无法停止线程池 monitorScheduler 已创建的监听线程。

@HzjNeverStop
Copy link
Contributor

是的,这个线程池没有添加关闭的钩子,会随着JVM的生命周期结束关闭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants