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; |
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 |
|
*/ |