56.11 Shutting down an Executor Service
ExecutorService provides a few techniques for initiating a shutdown. To notify the service that it should shutdown automatically after the currently running tasks have reached completion, a call to the shutdown() method should be made as follows:
executor.shutdown();
A call to the shutdownNow() method, on the other hand, stops all tasks running on the service and, cancels the processing of pending tasks:
executor.shutdownNow();