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.*; |
61 |
|
i = k; |
62 |
|
} |
63 |
|
pool.shutdown(); |
64 |
< |
} |
64 |
> |
} |
65 |
|
|
66 |
|
static final class Stage implements Callable<Integer> { |
67 |
|
final Queue<Integer> queue; |
68 |
|
final CyclicBarrier barrier; |
69 |
|
final int nthreads; |
70 |
< |
Stage (Queue<Integer> q, CyclicBarrier b, int nthreads) { |
70 |
> |
Stage(Queue<Integer> q, CyclicBarrier b, int nthreads) { |
71 |
|
queue = q; |
72 |
|
barrier = b; |
73 |
|
this.nthreads = nthreads; |