Javatpoint Logo
Javatpoint Logo

Java ForkJoinPool getStealCount() method

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

Syntax

Parameter

No parameter is passed.

Returns

This method returns the number of steals.

Example 1

Test it Now

Output:

Steal Count  :0

Example 2

Test it Now

Output:

numbers of core available in your processor:2
 Before Queued Submission  :0
  is awaitQuiescent :true
 Steal Count  :0
Pool.invoke :161
Next TopicJava Forkjoinpool





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA