Home
last modified time | relevance | path

Searched refs:barrier (Results 1 – 13 of 13) 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()
95 CyclicBarrier barrier = new CyclicBarrier(2); in test_parkUntil_1() local
96 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()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DCyclicBarrierTest.java60 void awaitNumberWaiting(CyclicBarrier barrier, int numberOfWaiters) { in awaitNumberWaiting() argument
62 while (barrier.getNumberWaiting() != numberOfWaiters) { in awaitNumberWaiting()
355 final CyclicBarrier barrier = new CyclicBarrier(3); in testResetWithoutBreakage() local
361 barrier.await(); in testResetWithoutBreakage()
367 barrier.await(); in testResetWithoutBreakage()
371 barrier.await(); in testResetWithoutBreakage()
374 assertFalse(barrier.isBroken()); in testResetWithoutBreakage()
375 assertEquals(0, barrier.getNumberWaiting()); in testResetWithoutBreakage()
376 if (i == 1) barrier.reset(); in testResetWithoutBreakage()
377 assertFalse(barrier.isBroken()); in testResetWithoutBreakage()
[all …]
DDoubleAdderTest.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 DoubleAdderTest.AdderTask
180 AdderTask(DoubleAdder adder, CyclicBarrier barrier, int incs) { in AdderTask() argument
182 this.barrier = barrier; in AdderTask()
188 barrier.await(); in run()
193 barrier.await(); in run()
DLongAdderTest.java187 CyclicBarrier barrier = new CyclicBarrier(nthreads + 1); in testAddAndSumMT() local
189 pool.execute(new AdderTask(a, barrier, incs)); in testAddAndSumMT()
190 barrier.await(); in testAddAndSumMT()
191 barrier.await(); in testAddAndSumMT()
200 final CyclicBarrier barrier; field in LongAdderTest.AdderTask
203 AdderTask(LongAdder adder, CyclicBarrier barrier, int incs) { in AdderTask() argument
205 this.barrier = barrier; in AdderTask()
211 barrier.await(); in run()
216 barrier.await(); in run()
DBlockingQueueTest.java241 final CheckedBarrier barrier = new CheckedBarrier(2); in testTimedPollWithOffer() local
249 barrier.await(); in testTimedPollWithOffer()
260 barrier.await(); in testTimedPollWithOffer()
270 barrier.await(); in testTimedPollWithOffer()
275 barrier.await(); in testTimedPollWithOffer()
DLinkedBlockingDequeTest.java1126 final CheckedBarrier barrier = new CheckedBarrier(2); in testTimedPollFirstWithOfferFirst() local
1133 barrier.await(); in testTimedPollFirstWithOfferFirst()
1143 barrier.await(); in testTimedPollFirstWithOfferFirst()
1151 barrier.await(); in testTimedPollFirstWithOfferFirst()
1155 barrier.await(); in testTimedPollFirstWithOfferFirst()
1396 final CheckedBarrier barrier = new CheckedBarrier(2);
1403 barrier.await();
1414 barrier.await();
1424 barrier.await();
1429 barrier.await();
DReentrantLockTest.java477 final CyclicBarrier barrier = new CyclicBarrier(2); in testIsLocked() local
482 barrier.await(); in testIsLocked()
483 barrier.await(); in testIsLocked()
487 barrier.await(); in testIsLocked()
489 barrier.await(); in testIsLocked()