ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/CancelledFutureLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/CancelledFutureLoops.java (file contents):
Revision 1.5 by jsr166, Tue Mar 15 19:47:05 2011 UTC vs.
Revision 1.8 by jsr166, Mon Aug 10 06:47:33 2015 UTC

# Line 18 | Line 18
18   * redistribute this code in any way without acknowledgement.
19   */
20  
21 + import java.util.*;
22   import java.util.concurrent.*;
23   import java.util.concurrent.locks.*;
23 import java.util.*;
24  
25   public final class CancelledFutureLoops {
26      static final ExecutorService pool = Executors.newCachedThreadPool();
# Line 44 | Line 44 | public final class CancelledFutureLoops
44          pool.shutdown();
45      }
46  
47 <    static final class FutureLoop implements Callable {
47 >    static final class FutureLoop implements Callable<Object> {
48          private int v = rng.next();
49          private final ReentrantLock lock = new ReentrantLock();
50          private final LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer();
# Line 56 | Line 56 | public final class CancelledFutureLoops
56          }
57  
58          final void test() throws Exception {
59 <            Future[] futures = new Future[nthreads];
59 >            Future<?>[] futures = new Future<?>[nthreads];
60              for (int i = 0; i < nthreads; ++i)
61                  futures[i] = pool.submit(this);
62  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines