equal
deleted
inserted
replaced
109 |
109 |
110 //---------------------------------------------------------------- |
110 //---------------------------------------------------------------- |
111 // Convenience methods for creating threads that call arrive, |
111 // Convenience methods for creating threads that call arrive, |
112 // awaitAdvance, arriveAndAwaitAdvance, awaitAdvanceInterruptibly |
112 // awaitAdvance, arriveAndAwaitAdvance, awaitAdvanceInterruptibly |
113 //---------------------------------------------------------------- |
113 //---------------------------------------------------------------- |
114 private static abstract class Arriver extends Thread { |
114 private abstract static class Arriver extends Thread { |
115 static AtomicInteger count = new AtomicInteger(1); |
115 static AtomicInteger count = new AtomicInteger(1); |
116 |
116 |
117 Arriver() { |
117 Arriver() { |
118 this("Arriver"); |
118 this("Arriver"); |
119 } |
119 } |
129 public Throwable result() { return this.result; } |
129 public Throwable result() { return this.result; } |
130 protected void phase(int phase) { this.phase = phase; } |
130 protected void phase(int phase) { this.phase = phase; } |
131 public int phase() { return this.phase; } |
131 public int phase() { return this.phase; } |
132 } |
132 } |
133 |
133 |
134 private static abstract class Awaiter extends Arriver { |
134 private abstract static class Awaiter extends Arriver { |
135 Awaiter() { super("Awaiter"); } |
135 Awaiter() { super("Awaiter"); } |
136 Awaiter(String name) { super(name); } |
136 Awaiter(String name) { super(name); } |
137 } |
137 } |
138 |
138 |
139 private static Arriver arriver(final Phaser phaser) { |
139 private static Arriver arriver(final Phaser phaser) { |