The Java ExecutorService.shutdown method is used to gracefully shutdown the ExecutorService by initiating the shutdown process. This method allows any previously submitted tasks to finish their execution, but it does not accept any new tasks. Once the shutdown process is initiated, any calls to ExecutorService.submit will throw a RejectedExecutionException. The shutdown method also stops the ExecutorService from accepting shutdown or termination requests. Overall, the shutdown method is important to ensure that the ExecutorService is terminated correctly without abruptly interrupting its executing tasks.
Java ExecutorService.shutdown - 30 examples found. These are the top rated real world Java examples of ExecutorService.shutdown extracted from open source projects. You can rate examples to help us improve the quality of examples.