Jam*_*mes 8 java multithreading
我收到了数百个这样的process_reaper线程,这些线程会在我的应用程序中随着时间的推移而积累.任何人都知道这些可能是什么?他们似乎在使用我的Runtime.exec()但是我在finally语句中销毁了我的进程但它们仍然出现
屏幕截图:http: //www.dropmocks.com/mBxM5
Process proc = null;
String line;
try {
logger.info("Trying to execute command " + Arrays.asList(command).toString().replace(",", ""));
proc = Runtime.getRuntime().exec(command);
} catch (IOException e) {
logger.info("IOException while trying to execute " + command);
return false;
} finally {
if(proc != null) {
proc.destroy();
}
}
Run Code Online (Sandbox Code Playgroud)