Javatpoint Logo
Javatpoint Logo

isTerminating() Method

The isTerminating() method of ForkJoinPool class returns true if the process of termination has started but not yet completed. This method is useful for debugging.

Syntax

Parameter

No parameter is passed.

Returns

True if terminating but not yet ended.

Throw

Does not throw the exception.

Example 1

Test it Now

Output:

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

Example 2

Test it Now

Output:

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




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials