/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | PendingFuture.java | 51 private CountDownLatch latch; field in PendingFuture 123 if (latch == null) in prepareForWait() 124 latch = new CountDownLatch(1); in prepareForWait() 141 if (latch != null) in setResult() 142 latch.countDown(); in setResult() 159 if (latch != null) in setFailure() 160 latch.countDown(); in setFailure() 180 latch.await(); in get() 197 if (!latch.await(timeout, unit)) throw new TimeoutException(); in get() 250 if (latch != null) in cancel() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ref/ |
D | FinalizeTest.java | 112 CountDownLatch latch = new CountDownLatch(3); in testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline() local 113 createSlowFinalizer( 1, latch); in testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline() 114 createSlowFinalizer(1000, latch); in testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline() 115 createSlowFinalizer(8000, latch); in testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline() 117 latch.await(); in testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline() 120 public void createSlowFinalizer(final long millis, final CountDownLatch latch) { in createSlowFinalizer() argument 125 latch.countDown(); in createSlowFinalizer()
|
/libcore/luni/src/test/java/libcore/java/security/ |
D | MessageDigestTest.java | 39 final CountDownLatch latch = new CountDownLatch(THREAD_COUNT); in testMessageDigest_MultipleThreads_Misuse() local 48 latch.countDown(); in testMessageDigest_MultipleThreads_Misuse() 49 latch.await(); in testMessageDigest_MultipleThreads_Misuse()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | JSR166TestCase.java | 886 PoolCleaner cleaner(ExecutorService pool, CountDownLatch latch) { in cleaner() argument 887 return new PoolCleanerWithReleaser(pool, releaser(latch)); in cleaner() 890 Runnable releaser(final CountDownLatch latch) { in releaser() argument 892 do { latch.countDown(); } in releaser() 893 while (latch.getCount() > 0); in releaser() 1471 public Callable<String> latchAwaitingStringTask(final CountDownLatch latch) { 1475 latch.await(); 1481 public Runnable countDowner(final CountDownLatch latch) { 1484 latch.countDown(); 1492 final CountDownLatch latch; [all …]
|
D | PhaserTest.java | 653 final CountDownLatch latch = new CountDownLatch(1); 658 latch.countDown(); 660 await(latch); 664 await(latch); 666 latch.countDown();
|
D | ForkJoinPoolTest.java | 657 CountDownLatch latch = new CountDownLatch(1); in testInvokeAny4() local 661 l.add(latchAwaitingStringTask(latch)); in testInvokeAny4() 667 latch.countDown(); in testInvokeAny4() 825 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 829 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 835 latch.countDown(); in testTimedInvokeAny3()
|
D | ScheduledExecutorSubclassTest.java | 946 final CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 950 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 956 latch.countDown(); in testInvokeAny3() 1111 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1115 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1121 latch.countDown(); in testTimedInvokeAny3()
|
D | ScheduledExecutorTest.java | 895 CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 899 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 905 latch.countDown(); in testInvokeAny3() 1060 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1064 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1070 latch.countDown(); in testTimedInvokeAny3()
|
D | ThreadPoolExecutorTest.java | 1515 final CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 1522 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 1528 latch.countDown(); in testInvokeAny3() 1714 final CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1721 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1727 latch.countDown(); in testTimedInvokeAny3()
|
D | ThreadPoolExecutorSubclassTest.java | 1508 CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 1515 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 1521 latch.countDown(); in testInvokeAny3() 1707 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1714 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1720 latch.countDown(); in testTimedInvokeAny3()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TimerTest.java | 1135 CountDownLatch latch = new CountDownLatch(1); field in TimerTest.SwallowUncaughtExceptionHandler 1138 latch.countDown(); in uncaughtException() 1142 if(!latch.await(millis, TimeUnit.MILLISECONDS)) { in waitForException()
|