基本上我有3个可以从Internet下载数据的runnables,我想让它们并行运行。现在我有以下代码:
ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(3);
executor.execute(firstRunnable);
executor.execute(secondRunnable);
executor.execute(thirdRunnable);
这是并行执行所有3个Runnables的正确方法吗? 谢谢!