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.concurrent.*; |
51 |
|
maxPairs = Integer.parseInt(args[0]); |
52 |
|
|
53 |
|
print = true; |
54 |
< |
int k = 1; |
55 |
< |
for (int i = 1; i <= maxPairs;) { |
54 |
> |
for (int k = 1, i = 1; i <= maxPairs;) { |
55 |
|
System.out.println("Pairs:" + i); |
56 |
|
oneTest(i, iters); |
57 |
|
Thread.sleep(100); |
63 |
|
i = k; |
64 |
|
} |
65 |
|
pool.shutdown(); |
66 |
< |
} |
66 |
> |
} |
67 |
|
|
68 |
|
static void oneTest(int n, int iters) throws Exception { |
69 |
|
if (print) |