ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ForkJoinPool.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ForkJoinPool.java (file contents):
Revision 1.353 by dl, Thu Dec 13 12:10:11 2018 UTC vs.
Revision 1.354 by dl, Sat May 11 11:02:57 2019 UTC

# Line 838 | Line 838 | public class ForkJoinPool extends Abstra
838                      growArray(true);
839                  else {
840                      phase = 0; // full volatile unlock
841 <                    if (a[m & (s - 1)] == null)
842 <                        signal = true;   // was empty
841 >                    if (((s - base) & ~1) == 0) // size 0 or 1
842 >                        signal = true;
843                  }
844              }
845              return signal;
# Line 2638 | Line 2638 | public class ForkJoinPool extends Abstra
2638      }
2639  
2640      /**
2641 <     * Returns an estimate of the total number of tasks stolen from
2642 <     * one thread's work queue by another. The reported value
2643 <     * underestimates the actual total number of steals when the pool
2644 <     * is not quiescent. This value may be useful for monitoring and
2645 <     * tuning fork/join programs: in general, steal counts should be
2646 <     * high enough to keep threads busy, but low enough to avoid
2647 <     * overhead and contention across threads.
2641 >     * Returns an estimate of the total number of completed tasks that
2642 >     * were executed by a thread other than their submitter. The
2643 >     * reported value underestimates the actual total number of steals
2644 >     * when the pool is not quiescent. This value may be useful for
2645 >     * monitoring and tuning fork/join programs: in general, steal
2646 >     * counts should be high enough to keep threads busy, but low
2647 >     * enough to avoid overhead and contention across threads.
2648       *
2649       * @return the number of steals
2650       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines