About Question enthuware.ocpjp.v11.2.3637 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
gadsgadsx
Posts: 13
Joined: Fri Apr 12, 2024 11:09 pm
Contact:

About Question enthuware.ocpjp.v11.2.3637 :

Post by gadsgadsx »

Won't the es.shutdown() force the last thread (5 thread) to finish?

exclusivewild
Posts: 1
Joined: Fri May 31, 2024 2:32 am
Contact:

Re: About Question enthuware.ocpjp.v11.2.3637 :

Post by exclusivewild »

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests