Javatpoint Logo
Javatpoint Logo

Java ForkJoinPool isQuiescent() Method

The 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.

Syntax

Parameter

No parameter is passed.

Returns

True if all threads are currently idle

Throws

Does not throw the exception.

Example 1

Test it Now

Output:

numbers of core available in your processor:4
  is Quiescent :true
Pool.invoke :161

Example 2

Test it Now

Output:

numbers of core available in your processor:4
  is Quiescent :true
Next TopicJava ForkJoinPool




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials