About Question enthuware.ocpjp.v11.2.3637 :
Moderator: admin
-
- Posts: 13
- Joined: Fri Apr 12, 2024 11:09 pm
- Contact:
About Question enthuware.ocpjp.v11.2.3637 :
Won't the es.shutdown() force the last thread (5 thread) to finish?
-
- Posts: 1
- Joined: Fri May 31, 2024 2:32 am
- Contact:
Re: About Question enthuware.ocpjp.v11.2.3637 :
In Java, the behavior of es.shutdown() (where es is an instance of ExecutorService) does not forcefully terminate currently running tasks. Instead, it initiates an orderly shutdown of the ExecutorService in which previously submitted tasks are executed, but no new tasks will be accepted.
Who is online
Users browsing this forum: No registered users and 10 guests