Java ForkJoinPool getRunningThreadCount() Method
The getRunningThreadCount() method of ForkJoinPool class returns the number of thread that is currently running that are not blocked waiting to join tasks. This method may overestimate the number of running thread.
This method returns the number of worker threads.
Example 1Test it Now
numbers of core available in your processor:2 Before invoking number of active thread :0 After invoking Numbers of active thread :1 Common Pool Size :1
Example 2Test it Now
Before invoking number of Running thread :0 After invoking Numbers of Running thread :10 Common Pool Size :10