小编Nan*_*ans的帖子

关闭除主要线程以外的所有线程

我想在调用main方法时关闭所有正在运行的线程(如果有的话).

public static void main(String[] args) throws Exception {
  // Close all thread except current one
  ...
  // Remaining of my program
}
Run Code Online (Sandbox Code Playgroud)

java multithreading

0
推荐指数
1
解决办法
3496
查看次数

标签 统计

java ×1

multithreading ×1