Home
last modified time | relevance | path

Searched refs:barrier (Results 1 – 7 of 7) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/
DThreadsTest.java52 CyclicBarrier barrier = new CyclicBarrier(2); in test_parkFor_1() local
53 Parker parker = new Parker(barrier, false, 500); in test_parkFor_1()
56 new Thread(new WaitAndUnpark(barrier, 1000, parkerThread)); in test_parkFor_1()
67 CyclicBarrier barrier = new CyclicBarrier(2); in test_parkFor_2() local
68 Parker parker = new Parker(barrier, false, 1000); in test_parkFor_2()
71 new Thread(new WaitAndUnpark(barrier, 300, parkerThread)); in test_parkFor_2()
82 CyclicBarrier barrier = new CyclicBarrier(1); in test_parkFor_3() local
83 Parker parker = new Parker(barrier, false, 1000); in test_parkFor_3()
94 CyclicBarrier barrier = new CyclicBarrier(2); in test_parkUntil_1() local
95 Parker parker = new Parker(barrier, true, 500); in test_parkUntil_1()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DCyclicBarrierTest.java41 void awaitNumberWaiting(CyclicBarrier barrier, int numberOfWaiters) { in awaitNumberWaiting() argument
43 while (barrier.getNumberWaiting() != numberOfWaiters) { in awaitNumberWaiting()
334 final CyclicBarrier barrier = new CyclicBarrier(3); in testResetWithoutBreakage() local
340 barrier.await(); in testResetWithoutBreakage()
346 barrier.await(); in testResetWithoutBreakage()
350 barrier.await(); in testResetWithoutBreakage()
353 assertFalse(barrier.isBroken()); in testResetWithoutBreakage()
354 assertEquals(0, barrier.getNumberWaiting()); in testResetWithoutBreakage()
355 if (i == 1) barrier.reset(); in testResetWithoutBreakage()
356 assertFalse(barrier.isBroken()); in testResetWithoutBreakage()
[all …]
DDoubleAdderTest.java141 CyclicBarrier barrier = new CyclicBarrier(nthreads + 1); in testAddAndSumMT() local
143 pool.execute(new AdderTask(a, barrier, incs)); in testAddAndSumMT()
144 barrier.await(); in testAddAndSumMT()
145 barrier.await(); in testAddAndSumMT()
154 final CyclicBarrier barrier; field in DoubleAdderTest.AdderTask
157 AdderTask(DoubleAdder adder, CyclicBarrier barrier, int incs) { in AdderTask() argument
159 this.barrier = barrier; in AdderTask()
165 barrier.await(); in run()
170 barrier.await(); in run()
DLongAdderTest.java164 CyclicBarrier barrier = new CyclicBarrier(nthreads + 1); in testAddAndSumMT() local
166 pool.execute(new AdderTask(a, barrier, incs)); in testAddAndSumMT()
167 barrier.await(); in testAddAndSumMT()
168 barrier.await(); in testAddAndSumMT()
177 final CyclicBarrier barrier; field in LongAdderTest.AdderTask
180 AdderTask(LongAdder adder, CyclicBarrier barrier, int incs) { in AdderTask() argument
182 this.barrier = barrier; in AdderTask()
188 barrier.await(); in run()
193 barrier.await(); in run()
DBlockingQueueTest.java217 final CheckedBarrier barrier = new CheckedBarrier(2); in testTimedPollWithOffer() local
225 barrier.await(); in testTimedPollWithOffer()
236 barrier.await(); in testTimedPollWithOffer()
246 barrier.await(); in testTimedPollWithOffer()
251 barrier.await(); in testTimedPollWithOffer()
DLinkedBlockingDequeTest.java1092 final CheckedBarrier barrier = new CheckedBarrier(2); in testTimedPollFirstWithOfferFirst() local
1099 barrier.await(); in testTimedPollFirstWithOfferFirst()
1109 barrier.await(); in testTimedPollFirstWithOfferFirst()
1117 barrier.await(); in testTimedPollFirstWithOfferFirst()
1121 barrier.await(); in testTimedPollFirstWithOfferFirst()
1362 final CheckedBarrier barrier = new CheckedBarrier(2);
1369 barrier.await();
1380 barrier.await();
1390 barrier.await();
1395 barrier.await();
DReentrantLockTest.java454 final CyclicBarrier barrier = new CyclicBarrier(2); in testIsLocked() local
459 barrier.await(); in testIsLocked()
460 barrier.await(); in testIsLocked()
464 barrier.await(); in testIsLocked()
466 barrier.await(); in testIsLocked()