/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/nio/channels/ |
D | ServerSocketChannelTest.java | 128 private final CountDownLatch latch; field in ServerSocketChannelTest.CountingServer 131 private CountingServer(ServerSocketChannel channel, CountDownLatch latch) { in CountingServer() argument 133 this.latch = latch; in CountingServer() 141 latch.countDown(); in call() 183 CountDownLatch latch = new CountDownLatch(1); in bind_loopback() local 184 Future<Integer> countFuture = executor.submit(new CountingServer(ssc, latch)); in bind_loopback() 187 latch.await(); in bind_loopback()
|
/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 | 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()
|
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()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | JSR166TestCase.java | 977 PoolCleaner cleaner(ExecutorService pool, CountDownLatch latch) { in cleaner() argument 978 return new PoolCleanerWithReleaser(pool, releaser(latch)); in cleaner() 981 Runnable releaser(final CountDownLatch latch) { in releaser() argument 983 do { latch.countDown(); } in releaser() 984 while (latch.getCount() > 0); in releaser() 1580 public Callable<String> latchAwaitingStringTask(final CountDownLatch latch) { 1584 latch.await(); 1590 public Runnable countDowner(final CountDownLatch latch) { 1593 latch.countDown(); 1601 final CountDownLatch latch; [all …]
|
D | PhaserTest.java | 677 final CountDownLatch latch = new CountDownLatch(1); 682 latch.countDown(); 684 await(latch); 688 await(latch); 690 latch.countDown();
|
D | ForkJoinPoolTest.java | 675 CountDownLatch latch = new CountDownLatch(1); in testInvokeAny4() local 679 l.add(latchAwaitingStringTask(latch)); in testInvokeAny4() 685 latch.countDown(); in testInvokeAny4() 843 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 847 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 853 latch.countDown(); in testTimedInvokeAny3()
|
D | ScheduledExecutorSubclassTest.java | 968 final CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 972 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 978 latch.countDown(); in testInvokeAny3() 1133 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1137 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1143 latch.countDown(); in testTimedInvokeAny3()
|
D | ScheduledExecutorTest.java | 916 CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 920 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 926 latch.countDown(); in testInvokeAny3() 1081 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1085 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1091 latch.countDown(); in testTimedInvokeAny3()
|
D | ThreadPoolExecutorSubclassTest.java | 1530 CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 1537 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 1543 latch.countDown(); in testInvokeAny3() 1729 CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1736 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1742 latch.countDown(); in testTimedInvokeAny3()
|
D | ThreadPoolExecutorTest.java | 1532 final CountDownLatch latch = new CountDownLatch(1); in testInvokeAny3() local 1539 l.add(latchAwaitingStringTask(latch)); in testInvokeAny3() 1545 latch.countDown(); in testInvokeAny3() 1731 final CountDownLatch latch = new CountDownLatch(1); in testTimedInvokeAny3() local 1738 l.add(latchAwaitingStringTask(latch)); in testTimedInvokeAny3() 1744 latch.countDown(); in testTimedInvokeAny3()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | ThreadTest.java | 176 final CountDownLatch latch = new CountDownLatch(1); in setPriority_starting() local 178 @Override public void run() { try { latch.await(); } catch (Exception e) { } } in setPriority_starting() 188 latch.countDown(); in setPriority_starting() 194 final CountDownLatch latch = new CountDownLatch(1); in setPriority_started() local 196 @Override public void run() { try { latch.await(); } catch (Exception e) { } } in setPriority_started() 201 latch.countDown(); in setPriority_started()
|
/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()
|