Java ForkJoinPool getStealCount() methodThe getStealCount() method of ForkJoinPool class returns estimation of a number of tasks stolen from one thread by another after completing execution of all tasks in own queue. Steal count is high enough to keep thread busy but also it does not avoid overhead. SyntaxParameterNo parameter is passed. ReturnsThis method returns the number of steals. Example 1Test it NowOutput: Steal Count :0 Example 2Test it NowOutput: numbers of core available in your processor:2 Before Queued Submission :0 is awaitQuiescent :true Steal Count :0 Pool.invoke :161
Next TopicJava Forkjoinpool
|