How to stop the execution of Executor ThreadPool in java?
I am working on the Executors in java to concurrently run more threads at a time. I have a set of Runnable Objects and i assign it to the Exceutors.The Executor is working fine and every thing is fine.But after all the tasks are executed in the pool ,the java program is not terminated,i think the Executor takes some time to kill the threads.please anyone help me to reduce the time taken by the executor after executing all tasks. The ExecutorService class has 2 methods just for this: shutdown() and shutdownNow() . After using the shutdown() method, you can call awaitTermination() to block until