156 |
|
public void realRun() { done.countDown(); }}; |
157 |
|
ScheduledFuture h = |
158 |
|
p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); |
159 |
< |
done.await(); |
159 |
> |
await(done); |
160 |
|
h.cancel(true); |
161 |
|
double normalizedTime = |
162 |
|
(double) millisElapsedSince(startTime) / delay; |
182 |
|
public void realRun() { done.countDown(); }}; |
183 |
|
ScheduledFuture h = |
184 |
|
p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); |
185 |
< |
done.await(); |
185 |
> |
await(done); |
186 |
|
h.cancel(true); |
187 |
|
double normalizedTime = |
188 |
|
(double) millisElapsedSince(startTime) / delay; |
315 |
|
public void realRun() throws InterruptedException { |
316 |
|
threadStarted.countDown(); |
317 |
|
assertEquals(1, p.getActiveCount()); |
318 |
< |
done.await(); |
318 |
> |
await(done); |
319 |
|
}}); |
320 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
321 |
|
assertEquals(1, p.getActiveCount()); |
379 |
|
p.execute(new CheckedRunnable() { |
380 |
|
public void realRun() throws InterruptedException { |
381 |
|
threadsStarted.countDown(); |
382 |
< |
done.await(); |
382 |
> |
await(done); |
383 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
384 |
|
}}); |
385 |
|
assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
403 |
|
public void realRun() throws InterruptedException { |
404 |
|
threadStarted.countDown(); |
405 |
|
assertEquals(1, p.getPoolSize()); |
406 |
< |
done.await(); |
406 |
> |
await(done); |
407 |
|
}}); |
408 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
409 |
|
assertEquals(1, p.getPoolSize()); |
426 |
|
p.execute(new CheckedRunnable() { |
427 |
|
public void realRun() throws InterruptedException { |
428 |
|
threadStarted.countDown(); |
429 |
< |
done.await(); |
429 |
> |
await(done); |
430 |
|
}}); |
431 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
432 |
|
assertEquals(1, p.getTaskCount()); |
437 |
|
public void realRun() throws InterruptedException { |
438 |
|
threadStarted.countDown(); |
439 |
|
assertEquals(1 + TASKS, p.getTaskCount()); |
440 |
< |
done.await(); |
440 |
> |
await(done); |
441 |
|
}}); |
442 |
|
} |
443 |
|
assertEquals(1 + TASKS, p.getTaskCount()); |
512 |
|
public void realRun() throws InterruptedException { |
513 |
|
assertFalse(p.isTerminated()); |
514 |
|
threadStarted.countDown(); |
515 |
< |
done.await(); |
515 |
> |
await(done); |
516 |
|
}}); |
517 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
518 |
|
assertFalse(p.isTerminating()); |
536 |
|
public void realRun() throws InterruptedException { |
537 |
|
assertFalse(p.isTerminating()); |
538 |
|
threadStarted.countDown(); |
539 |
< |
done.await(); |
539 |
> |
await(done); |
540 |
|
}}); |
541 |
|
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
542 |
|
assertFalse(p.isTerminating()); |
561 |
|
Runnable r = new CheckedRunnable() { |
562 |
|
public void realRun() throws InterruptedException { |
563 |
|
threadStarted.countDown(); |
564 |
< |
done.await(); |
564 |
> |
await(done); |
565 |
|
}}; |
566 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
567 |
|
} |
586 |
|
Runnable r = new CheckedRunnable() { |
587 |
|
public void realRun() throws InterruptedException { |
588 |
|
threadStarted.countDown(); |
589 |
< |
done.await(); |
589 |
> |
await(done); |
590 |
|
}}; |
591 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
592 |
|
} |