1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
import java.util.*; |
43 |
|
Thread.sleep(100); |
44 |
|
print = true; |
45 |
|
|
46 |
< |
int k = 1; |
47 |
< |
for (int i = 1; i <= maxStages;) { |
46 |
> |
for (int k = 1, i = 1; i <= maxStages;) { |
47 |
|
oneRun(klass, i, items); |
48 |
|
if (i == k) { |
49 |
|
k = i << 1; |
53 |
|
i = k; |
54 |
|
} |
55 |
|
pool.shutdown(); |
56 |
< |
} |
56 |
> |
} |
57 |
|
|
58 |
|
static class Stage implements Callable<Integer> { |
59 |
|
final Deque<Integer> queue; |