150151152153154155156157158159160
{ executor = Executors.newFixedThreadPool(NUM_OF_WRITERS); for (Block b : s) { executor.execute(new Writer(b, this)); } //Close the executor by continuing to execute the writers executor.shutdown();