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

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.87 by jsr166, Sun Oct 4 02:38:46 2015 UTC vs.
Revision 1.88 by jsr166, Sun Oct 4 02:46:13 2015 UTC

# Line 1018 | Line 1018 | public class ThreadPoolExecutorTest exte
1018                                     60, SECONDS,
1019                                     new ArrayBlockingQueue<Runnable>(10));
1020  
1021 <        final CountDownLatch threadStarted = new CountDownLatch(1);
1022 <        final CountDownLatch done = new CountDownLatch(1);
1023 <        try {
1021 >        try (PoolCleaner cleaner = cleaner(p)) {
1022 >            final CountDownLatch threadStarted = new CountDownLatch(1);
1023 >            final CountDownLatch done = new CountDownLatch(1);
1024              Thread t = newStartedThread(new CheckedInterruptedRunnable() {
1025                  public void realRun() throws Exception {
1026                      Callable task = new CheckedCallable<Boolean>() {
# Line 1035 | Line 1035 | public class ThreadPoolExecutorTest exte
1035              assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
1036              t.interrupt();
1037              awaitTermination(t, MEDIUM_DELAY_MS);
1038        } finally {
1038              done.countDown();
1040            joinPool(p);
1039          }
1040      }
1041  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines