ArrayList<Thread> mythreads = new ArrayList<Thread>();
int tcount = 1000;
for(int i=0; i< tcount; i++) {
Thread thr = new myThread();
mythreads.add(thr);
thr.start();
}
for (Thread thr : mythreads) {
thr.joint();
}
ExecutorService es = Executors.newCachedThreadPool();
for(int i=0;i<5000;i++)
es.execute(new Runnable() { /* your task */ });
es.shutdown();
boolean finshed = es.awaitTermination(1, TimeUnit.MINUTES);
И нужно ли вообще?