113 |
|
public void realRun() throws InterruptedException { |
114 |
|
threadStarted.countDown(); |
115 |
|
assertEquals(1, p.getActiveCount()); |
116 |
< |
done.await(); |
116 |
> |
await(done); |
117 |
|
}}); |
118 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
119 |
|
assertEquals(1, p.getActiveCount()); |
341 |
|
p.execute(new CheckedRunnable() { |
342 |
|
public void realRun() throws InterruptedException { |
343 |
|
threadsStarted.countDown(); |
344 |
< |
done.await(); |
344 |
> |
await(done); |
345 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
346 |
|
}}); |
347 |
|
assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
385 |
|
public void realRun() throws InterruptedException { |
386 |
|
threadStarted.countDown(); |
387 |
|
assertEquals(1, p.getPoolSize()); |
388 |
< |
done.await(); |
388 |
> |
await(done); |
389 |
|
}}); |
390 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
391 |
|
assertEquals(1, p.getPoolSize()); |
409 |
|
p.execute(new CheckedRunnable() { |
410 |
|
public void realRun() throws InterruptedException { |
411 |
|
threadStarted.countDown(); |
412 |
< |
done.await(); |
412 |
> |
await(done); |
413 |
|
}}); |
414 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
415 |
|
assertEquals(1, p.getTaskCount()); |
420 |
|
public void realRun() throws InterruptedException { |
421 |
|
threadStarted.countDown(); |
422 |
|
assertEquals(1 + TASKS, p.getTaskCount()); |
423 |
< |
done.await(); |
423 |
> |
await(done); |
424 |
|
}}); |
425 |
|
} |
426 |
|
assertEquals(1 + TASKS, p.getTaskCount()); |
493 |
|
public void realRun() throws InterruptedException { |
494 |
|
assertFalse(p.isTerminating()); |
495 |
|
threadStarted.countDown(); |
496 |
< |
done.await(); |
496 |
> |
await(done); |
497 |
|
}}); |
498 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
499 |
|
assertFalse(p.isTerminating()); |
521 |
|
public void realRun() throws InterruptedException { |
522 |
|
assertFalse(p.isTerminating()); |
523 |
|
threadStarted.countDown(); |
524 |
< |
done.await(); |
524 |
> |
await(done); |
525 |
|
}}); |
526 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
527 |
|
assertFalse(p.isTerminating()); |
551 |
|
public Boolean realCall() throws InterruptedException { |
552 |
|
threadStarted.countDown(); |
553 |
|
assertSame(q, p.getQueue()); |
554 |
< |
done.await(); |
554 |
> |
await(done); |
555 |
|
return Boolean.TRUE; |
556 |
|
}}; |
557 |
|
tasks[i] = new FutureTask(task); |
583 |
|
tasks[i] = new CheckedRunnable() { |
584 |
|
public void realRun() throws InterruptedException { |
585 |
|
threadStarted.countDown(); |
586 |
< |
done.await(); |
586 |
> |
await(done); |
587 |
|
}}; |
588 |
|
p.execute(tasks[i]); |
589 |
|
} |
618 |
|
Callable task = new CheckedCallable<Boolean>() { |
619 |
|
public Boolean realCall() throws InterruptedException { |
620 |
|
threadStarted.countDown(); |
621 |
< |
done.await(); |
621 |
> |
await(done); |
622 |
|
return Boolean.TRUE; |
623 |
|
}}; |
624 |
|
tasks[i] = new FutureTask(task); |
1037 |
|
Callable task = new CheckedCallable<Boolean>() { |
1038 |
|
public Boolean realCall() throws InterruptedException { |
1039 |
|
threadStarted.countDown(); |
1040 |
< |
done.await(); |
1040 |
> |
await(done); |
1041 |
|
return Boolean.TRUE; |
1042 |
|
}}; |
1043 |
|
p.submit(task).get(); |
1061 |
|
final CountDownLatch done = new CountDownLatch(1); |
1062 |
|
Runnable task = new CheckedRunnable() { |
1063 |
|
public void realRun() throws InterruptedException { |
1064 |
< |
done.await(); |
1064 |
> |
await(done); |
1065 |
|
}}; |
1066 |
|
for (int i = 0; i < 2; ++i) |
1067 |
|
p.execute(task); |
1088 |
|
final CountDownLatch done = new CountDownLatch(1); |
1089 |
|
Runnable task = new CheckedRunnable() { |
1090 |
|
public void realRun() throws InterruptedException { |
1091 |
< |
done.await(); |
1091 |
> |
await(done); |
1092 |
|
}}; |
1093 |
|
for (int i = 0; i < 2; ++i) |
1094 |
|
p.submit(task); |
1115 |
|
final CountDownLatch done = new CountDownLatch(1); |
1116 |
|
Runnable task = new CheckedRunnable() { |
1117 |
|
public void realRun() throws InterruptedException { |
1118 |
< |
done.await(); |
1118 |
> |
await(done); |
1119 |
|
}}; |
1120 |
|
for (int i = 0; i < 2; ++i) |
1121 |
|
p.submit(Executors.callable(task)); |
1144 |
|
final CountDownLatch done = new CountDownLatch(1); |
1145 |
|
Runnable blocker = new CheckedRunnable() { |
1146 |
|
public void realRun() throws InterruptedException { |
1147 |
< |
done.await(); |
1147 |
> |
await(done); |
1148 |
|
}}; |
1149 |
|
p.execute(blocker); |
1150 |
|
TrackedNoOpRunnable[] tasks = new TrackedNoOpRunnable[5]; |