5354555657585960616263
tasks[i] = new CounterRunnable(this); } exeQueue.clear(); for (int i = 0; i < numTasks; ++i) { executor.execute(tasks[i]); } executor.shutdownAfterProcessingCurrentlyQueuedTasks(); assertTrue(exeQueue.size() == numTasks);