mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
change arthas threads to be daemon #1346
This commit is contained in:
@@ -122,7 +122,7 @@ public class ArthasBootstrap {
|
||||
executorService = Executors.newScheduledThreadPool(1, new ThreadFactory() {
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
final Thread t = new Thread(r, "as-command-execute-daemon");
|
||||
final Thread t = new Thread(r, "arthas-command-execute");
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ public class ShellServerImpl extends ShellServer {
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
final Thread t = new Thread(r, "arthas-shell-server");
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -111,6 +111,7 @@ public class SessionManagerImpl implements SessionManager {
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
final Thread t = new Thread(r, "arthas-shell-server");
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
/**
|
||||
* Arthas 使用情况统计
|
||||
@@ -16,7 +17,14 @@ import java.util.concurrent.Executors;
|
||||
* Created by zhuyong on 15/11/12.
|
||||
*/
|
||||
public class UserStatUtil {
|
||||
private static final ExecutorService executorService = Executors.newSingleThreadExecutor();
|
||||
private static final ExecutorService executorService = Executors.newSingleThreadExecutor(new ThreadFactory() {
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
final Thread t = new Thread(r, "arthas-UserStat");
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
});
|
||||
private static final String ip = IPUtils.getLocalIP();
|
||||
|
||||
private static final String version = URLEncoder.encode(ArthasBanner.version().replace("\n", ""));
|
||||
|
||||
Reference in New Issue
Block a user