ExecutorServiceinterface is among the most commonly used items in the
java.util.concurrentpackage. When finished using an
ExecutorService, you need to shut it down explicitly. From its javadoc:
"An unused ExecutorService should be shut down to allow reclamation of its resources."
initiates a gradual and orderly shutdown.
Submitted tasks are still executed, but no new tasks will be accepted.
If you then want to wait until shutdown has completed, call
to terminate in a more aggressive manner.