@@ -102,6 +102,26 @@ public final class ThreadUtils {
}
+ /**
+ * 停止线程
+ *
+ * @param threads 线程对象数组
+ */
+ public static void stop(@NonNull Thread... threads) {
+ interrupt(threads);
+ join(threads);
+ }
+
+ * @param threads 线程对象集合
+ public static void stop(@NonNull Collection<Thread> threads) {
/**
* 中断线程
*