Java ForkJoinPool isTerminated() MethodThe isTerminated() method of ForkJoinPool class returns true if all the tasks in the pool have been shut down. SyntaxParameterNo parameter is passed. ReturnsTrue if all tasks have completed following shut down ThrowsDoes not throw the exception. Example 1Test it NowOutput: 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 2Test it NowOutput: numbers of core available in your processor:4 is terminated :false
Next TopicJava ForkJoinPool
|