From 20f4b4d9a3977b0d7b95e47f632fd299a397a988 Mon Sep 17 00:00:00 2001 From: James58899 Date: Mon, 13 Mar 2023 19:19:25 +0800 Subject: Close worker thread pool on profiler stop (#305, #298, #281) --- .../src/main/java/me/lucko/spark/common/sampler/java/JavaSampler.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spark-common') diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/java/JavaSampler.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/java/JavaSampler.java index e9d7e0d..2e40406 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/sampler/java/JavaSampler.java +++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/java/JavaSampler.java @@ -110,6 +110,8 @@ public class JavaSampler extends AbstractSampler implements Runnable { // collect statistics for the final window this.windowStatisticsCollector.measureNow(this.lastWindow.get()); } + + this.workerPool.shutdown(); } @Override -- cgit