Java ForkJoinPool awaitQuiescence() MethodThe awaitQuiescence method of ForkJoinPool class is used to execute the task until this pool is quiescent if called by ForkJoinTask. Otherwise, it assists performing tasks until all the worker threads are idle. The thread which cannot lead a task to execute is called an idle thread. Syntax:Parameter:timeout - the time to wait unit - the time unit of the timeout argument this can be HOUR, SECONDS, DA, etc. Returns:True if quiescent; false if the timeout elapsed. Throw:Does not throw 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 awaitQuiescent :true
Next TopicForkjoinpool commonPool()
|