260 |
|
public void realRun() throws InterruptedException { |
261 |
|
threadStarted.countDown(); |
262 |
|
assertEquals(1, p.getActiveCount()); |
263 |
< |
done.await(); |
263 |
> |
await(done); |
264 |
|
}}); |
265 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
266 |
|
assertEquals(1, p.getActiveCount()); |
488 |
|
p.execute(new CheckedRunnable() { |
489 |
|
public void realRun() throws InterruptedException { |
490 |
|
threadsStarted.countDown(); |
491 |
< |
done.await(); |
491 |
> |
await(done); |
492 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
493 |
|
}}); |
494 |
|
assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
532 |
|
public void realRun() throws InterruptedException { |
533 |
|
threadStarted.countDown(); |
534 |
|
assertEquals(1, p.getPoolSize()); |
535 |
< |
done.await(); |
535 |
> |
await(done); |
536 |
|
}}); |
537 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
538 |
|
assertEquals(1, p.getPoolSize()); |
556 |
|
p.execute(new CheckedRunnable() { |
557 |
|
public void realRun() throws InterruptedException { |
558 |
|
threadStarted.countDown(); |
559 |
< |
done.await(); |
559 |
> |
await(done); |
560 |
|
}}); |
561 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
562 |
|
assertEquals(1, p.getTaskCount()); |
567 |
|
public void realRun() throws InterruptedException { |
568 |
|
threadStarted.countDown(); |
569 |
|
assertEquals(1 + TASKS, p.getTaskCount()); |
570 |
< |
done.await(); |
570 |
> |
await(done); |
571 |
|
}}); |
572 |
|
} |
573 |
|
assertEquals(1 + TASKS, p.getTaskCount()); |
608 |
|
public void realRun() throws InterruptedException { |
609 |
|
assertFalse(p.isTerminating()); |
610 |
|
threadStarted.countDown(); |
611 |
< |
done.await(); |
611 |
> |
await(done); |
612 |
|
}}); |
613 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
614 |
|
assertFalse(p.isTerminating()); |
636 |
|
public void realRun() throws InterruptedException { |
637 |
|
assertFalse(p.isTerminating()); |
638 |
|
threadStarted.countDown(); |
639 |
< |
done.await(); |
639 |
> |
await(done); |
640 |
|
}}); |
641 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
642 |
|
assertFalse(p.isTerminating()); |
666 |
|
public Boolean realCall() throws InterruptedException { |
667 |
|
threadStarted.countDown(); |
668 |
|
assertSame(q, p.getQueue()); |
669 |
< |
done.await(); |
669 |
> |
await(done); |
670 |
|
return Boolean.TRUE; |
671 |
|
}}; |
672 |
|
tasks[i] = new FutureTask(task); |
698 |
|
tasks[i] = new CheckedRunnable() { |
699 |
|
public void realRun() throws InterruptedException { |
700 |
|
threadStarted.countDown(); |
701 |
< |
done.await(); |
701 |
> |
await(done); |
702 |
|
}}; |
703 |
|
p.execute(tasks[i]); |
704 |
|
} |
733 |
|
Callable task = new CheckedCallable<Boolean>() { |
734 |
|
public Boolean realCall() throws InterruptedException { |
735 |
|
threadStarted.countDown(); |
736 |
< |
done.await(); |
736 |
> |
await(done); |
737 |
|
return Boolean.TRUE; |
738 |
|
}}; |
739 |
|
tasks[i] = new FutureTask(task); |
1144 |
|
final CountDownLatch done = new CountDownLatch(1); |
1145 |
|
Runnable task = new CheckedRunnable() { |
1146 |
|
public void realRun() throws InterruptedException { |
1147 |
< |
done.await(); |
1147 |
> |
await(done); |
1148 |
|
}}; |
1149 |
|
for (int i = 0; i < 2; ++i) |
1150 |
|
p.execute(task); |
1172 |
|
final CountDownLatch done = new CountDownLatch(1); |
1173 |
|
Runnable blocker = new CheckedRunnable() { |
1174 |
|
public void realRun() throws InterruptedException { |
1175 |
< |
done.await(); |
1175 |
> |
await(done); |
1176 |
|
}}; |
1177 |
|
p.execute(blocker); |
1178 |
|
TrackedNoOpRunnable[] tasks = new TrackedNoOpRunnable[5]; |