Javatpoint Logo
Javatpoint Logo

Java ForkJoinPool isTerminated() Method

The isTerminated() method of ForkJoinPool class returns true if all the tasks in the pool have been shut down.

Syntax

Parameter

No parameter is passed.

Returns

True if all tasks have completed following shut down

Throws

Does not throw the exception.

Example 1

Test it Now

Output:

numbers of core available in your processor:2
   Before awaitTermination (is terminated):false
  is awaitQuiescent :true
   After awaitTermination (is terminated):false
Pool.invoke :161

Example 2

Test it Now

Output:

numbers of core available in your processor:4
  is terminated :false
Next TopicJava ForkJoinPool





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA