Java forkJoinPool getPoolSize() MethodThe getPoolSize() method of ForkJoinPool class is used to get the size of the pool. Size of the pool depends on the number of workers that have started but not yet terminated. SyntaxParameterNo parameter is passed. ReturnsThe number of worker threads. ThrowsDoes not throw the exception. Example 1Test it NowOutput: Common Pool Size before :0 Common Pool Size after :1 Example 2Test it NowOutput: Pool Size :2
Next TopicJava Forkjoinpool
|