if (isDownloadLogRequired) {
ExecutorService pool = Executors.newFixedThreadPool(THREAD_POOL_SIZE);
for (HostGenericServiceTicket hostGenericServiceTicket : hostGenericServiceTickets) {
pool.submit(new DiagnosticLogDownloader(logNames, downloadTo, hostGenericServiceTicket));
}
pool.shutdown();
try {
pool.awaitTermination(downloadTimeout, TimeUnit.SECONDS);
} catch (InterruptedException e) {
System.err.println(MessageFormat.format("{0}: Reason: {1}", e.getClass()
.getSimpleName(), e.getMessage()));
}
}
如果 downloadTimeout 设置为 180 秒,线程应该被杀死并且程序应该结束吗?