Home
last modified time | relevance | path

Searched refs:latch (Results 1 – 11 of 11) sorted by relevance

/libcore/ojluni/src/main/java/sun/nio/ch/
DPendingFuture.java51 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/
DFinalizeTest.java112 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/
DMessageDigestTest.java39 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/
DJSR166TestCase.java886 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 …]
DPhaserTest.java653 final CountDownLatch latch = new CountDownLatch(1);
658 latch.countDown();
660 await(latch);
664 await(latch);
666 latch.countDown();
DForkJoinPoolTest.java657 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()
DScheduledExecutorSubclassTest.java946 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()
DScheduledExecutorTest.java895 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()
DThreadPoolExecutorTest.java1515 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()
DThreadPoolExecutorSubclassTest.java1508 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/
DTimerTest.java1135 CountDownLatch latch = new CountDownLatch(1); field in TimerTest.SwallowUncaughtExceptionHandler
1138 latch.countDown(); in uncaughtException()
1142 if(!latch.await(millis, TimeUnit.MILLISECONDS)) { in waitForException()