Skip to main content
grammar
Source Link
Bono
  • 4.9k
  • 8
  • 52
  • 78

Currently I am working on threading jobs using ExecutorServicethe ExecutorService class and newFixedThreadPoolthe newFixedThreadPool command in javaJava. When I missedforgot to write shutdown() commendexecute the shutdown() command after declaring ExecuterServicethe ExecuterService instance, my program never turned off. Actually II guessed that ExecuterServiceExecuterService may have anyan internal command shutting down its threads, since it implements Executorthe Executor interface which doesn't have explicit shutdownshutdown() commands. I am wondering what happens inside the program with ExecutorServiceExecutorService class and related threads, such as when the threads will be dead, and what will happen the shutdownshutdown() command is missedforgotten. Thank you.

Currently I am working on threading jobs using ExecutorService class and newFixedThreadPool command in java. When I missed to write shutdown() commend after declaring ExecuterService instance, my program never turned off. Actually I guessed that ExecuterService may have any internal command shutting down its threads since it implements Executor interface which doesn't have explicit shutdown commands. I am wondering what happens inside the program with ExecutorService class and related threads such as when the threads will be dead and what will happen the shutdown command is missed. Thank you.

Currently I am working on threading jobs using the ExecutorService class and the newFixedThreadPool command in Java. When I forgot to execute the shutdown() command after declaring the ExecuterService instance, my program never turned off. I guessed that ExecuterService may have an internal command shutting down its threads, since it implements the Executor interface which doesn't have explicit shutdown() commands. I am wondering what happens inside the ExecutorService class and related threads, such as when the threads will be dead, and what will happen the shutdown() command is forgotten. Thank you.

Source Link

what will happen if I miss shutdown clause after declaring ExecutorService in java

Currently I am working on threading jobs using ExecutorService class and newFixedThreadPool command in java. When I missed to write shutdown() commend after declaring ExecuterService instance, my program never turned off. Actually I guessed that ExecuterService may have any internal command shutting down its threads since it implements Executor interface which doesn't have explicit shutdown commands. I am wondering what happens inside the program with ExecutorService class and related threads such as when the threads will be dead and what will happen the shutdown command is missed. Thank you.