Java ForkJoinPool isQuiescent() MethodThe isQuiscent() method of ForkJoinPool class returns true if all the worker threads are currently idle. An idle worker is the one that cannot obtain a task to execute because none are available to steal from other threads, and there are no pending submissions to the pool. SyntaxParameterNo parameter is passed. ReturnsTrue if all threads are currently idle ThrowsDoes not throw the exception. Example 1Test it NowOutput: numbers of core available in your processor:4 is Quiescent :true Pool.invoke :161 Example 2Test it NowOutput: numbers of core available in your processor:4 is Quiescent :true
Next TopicJava ForkJoinPool
|