Home
last modified time | relevance | path

Searched refs:barrier (Results 1 – 5 of 5) 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.java30 void awaitNumberWaiting(CyclicBarrier barrier, int numberOfWaiters) { in awaitNumberWaiting() argument
32 while (barrier.getNumberWaiting() != numberOfWaiters) { in awaitNumberWaiting()
323 final CyclicBarrier barrier = new CyclicBarrier(3); in testResetWithoutBreakage() local
329 barrier.await(); in testResetWithoutBreakage()
335 barrier.await(); in testResetWithoutBreakage()
339 barrier.await(); in testResetWithoutBreakage()
342 assertFalse(barrier.isBroken()); in testResetWithoutBreakage()
343 assertEquals(0, barrier.getNumberWaiting()); in testResetWithoutBreakage()
344 if (i == 1) barrier.reset(); in testResetWithoutBreakage()
345 assertFalse(barrier.isBroken()); in testResetWithoutBreakage()
[all …]
DBlockingQueueTest.java205 final CheckedBarrier barrier = new CheckedBarrier(2); in testTimedPollWithOffer() local
213 barrier.await(); in testTimedPollWithOffer()
224 barrier.await(); in testTimedPollWithOffer()
232 barrier.await(); in testTimedPollWithOffer()
237 barrier.await(); in testTimedPollWithOffer()
DLinkedBlockingDequeTest.java1065 final CheckedBarrier barrier = new CheckedBarrier(2); in testTimedPollFirstWithOfferFirst() local
1072 barrier.await(); in testTimedPollFirstWithOfferFirst()
1082 barrier.await(); in testTimedPollFirstWithOfferFirst()
1090 barrier.await(); in testTimedPollFirstWithOfferFirst()
1094 barrier.await(); in testTimedPollFirstWithOfferFirst()
1330 final CheckedBarrier barrier = new CheckedBarrier(2);
1337 barrier.await();
1348 barrier.await();
1356 barrier.await();
1361 barrier.await();
DReentrantLockTest.java436 final CyclicBarrier barrier = new CyclicBarrier(2); in testIsLocked() local
441 barrier.await(); in testIsLocked()
442 barrier.await(); in testIsLocked()
446 barrier.await(); in testIsLocked()
448 barrier.await(); in testIsLocked()