Home
last modified time | relevance | path

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

/libcore/ojluni/src/test/java/util/concurrent/tck/
DPhaserTest.java61 protected void assertState(Phaser phaser, in assertState() argument
63 assertEquals(phase, phaser.getPhase()); in assertState()
64 assertEquals(parties, phaser.getRegisteredParties()); in assertState()
65 assertEquals(unarrived, phaser.getUnarrivedParties()); in assertState()
66 assertEquals(parties - unarrived, phaser.getArrivedParties()); in assertState()
67 assertFalse(phaser.isTerminated()); in assertState()
71 protected void assertTerminated(Phaser phaser, int maxPhase, int parties) { in assertTerminated() argument
72 assertTrue(phaser.isTerminated()); in assertTerminated()
74 assertEquals(expectedPhase, phaser.getPhase()); in assertTerminated()
75 assertEquals(parties, phaser.getRegisteredParties()); in assertTerminated()
[all …]
DLongAccumulatorTest.java152 Phaser phaser = new Phaser(nthreads + 1); in testAccumulateAndGetMT() local
154 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
155 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
156 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
165 final Phaser phaser; field in LongAccumulatorTest.AccTask
168 AccTask(LongAccumulator acc, Phaser phaser, int incs) { in AccTask() argument
170 this.phaser = phaser; in AccTask()
175 phaser.arriveAndAwaitAdvance(); in run()
180 phaser.arrive(); in run()
DDoubleAccumulatorTest.java152 Phaser phaser = new Phaser(nthreads + 1); in testAccumulateAndGetMT() local
154 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
155 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
156 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
165 final Phaser phaser; field in DoubleAccumulatorTest.AccTask
168 AccTask(DoubleAccumulator acc, Phaser phaser, int incs) { in AccTask() argument
170 this.phaser = phaser; in AccTask()
175 phaser.arriveAndAwaitAdvance(); in run()
180 phaser.arrive(); in run()
/libcore/jsr166-tests/src/test/java/jsr166/
DPhaserTest.java37 protected void assertState(Phaser phaser, in assertState() argument
39 assertEquals(phase, phaser.getPhase()); in assertState()
40 assertEquals(parties, phaser.getRegisteredParties()); in assertState()
41 assertEquals(unarrived, phaser.getUnarrivedParties()); in assertState()
42 assertEquals(parties - unarrived, phaser.getArrivedParties()); in assertState()
43 assertFalse(phaser.isTerminated()); in assertState()
47 protected void assertTerminated(Phaser phaser, int maxPhase, int parties) { in assertTerminated() argument
48 assertTrue(phaser.isTerminated()); in assertTerminated()
50 assertEquals(expectedPhase, phaser.getPhase()); in assertTerminated()
51 assertEquals(parties, phaser.getRegisteredParties()); in assertTerminated()
[all …]
DDoubleAccumulatorTest.java129 Phaser phaser = new Phaser(nthreads + 1); in testAccumulateAndGetMT() local
131 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
132 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
133 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
142 final Phaser phaser; field in DoubleAccumulatorTest.AccTask
145 AccTask(DoubleAccumulator acc, Phaser phaser, int incs) { in AccTask() argument
147 this.phaser = phaser; in AccTask()
152 phaser.arriveAndAwaitAdvance(); in run()
157 phaser.arrive(); in run()
DLongAccumulatorTest.java129 Phaser phaser = new Phaser(nthreads + 1); in testAccumulateAndGetMT() local
131 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
132 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
133 phaser.arriveAndAwaitAdvance(); in testAccumulateAndGetMT()
142 final Phaser phaser; field in LongAccumulatorTest.AccTask
145 AccTask(LongAccumulator acc, Phaser phaser, int incs) { in AccTask() argument
147 this.phaser = phaser; in AccTask()
152 phaser.arriveAndAwaitAdvance(); in run()
157 phaser.arrive(); in run()
/libcore/ojluni/src/main/java/java/util/concurrent/
DPhaser.java1085 final Phaser phaser; field in Phaser.QNode
1095 QNode(Phaser phaser, int phase, boolean interruptible, in QNode() argument
1097 this.phaser = phaser; in QNode()
1109 if (phaser.getPhase() != phase) { in isReleasable()