0
我想一次啓動線程組中的所有線程。一組線程(線程組)是否可以使用線程池ExecutorService或任何方法一次啓動?
ThreadGroup1 obj = new ThreadGroup1();
ThreadGroup tg1 = new ThreadGroup("Parent ThreadGroup");
Thread t1=new Thread(tg1, obj, "one");
Thread t2=new Thread(tg1, obj, "two");
Thread t3=new Thread(tg1, obj, "three");
t1.start();
t2.start();
t3.start();