Home | History | Annotate | Download | only in concurrent

Lines Matching refs:guard

35   public class TestGuard extends Monitor.Guard {
142 TestGuard guard = new TestGuard(true);
143 thread1.callAndAssertReturns(enterWhen(), guard);
147 TestGuard guard = new TestGuard(false);
148 thread1.callAndAssertWaits(enterWhen(), guard);
150 guard.setSatisfied(true);
156 TestGuard guard = new TestGuard(true);
158 thread1.callAndAssertBlocks(enterWhen(), guard);
164 TestGuard guard = new TestGuard(true);
165 thread1.callAndAssertReturns(true, enterIf(), guard);
170 TestGuard guard = new TestGuard(false);
171 thread1.callAndAssertReturns(false, enterIf(), guard);
176 TestGuard guard = new TestGuard(true);
178 thread1.callAndAssertBlocks(enterIf(), guard);
184 TestGuard guard = new TestGuard(true);
185 thread1.callAndAssertReturns(true, tryEnterIf(), guard);
190 TestGuard guard = new TestGuard(false);
191 thread1.callAndAssertReturns(false, tryEnterIf(), guard);
196 TestGuard guard = new TestGuard(true);
198 thread1.callAndAssertReturns(false, tryEnterIf(), guard);
202 TestGuard guard = new TestGuard(true);
204 thread1.callAndAssertReturns(waitFor(), guard);
208 TestGuard guard = new TestGuard(false);
210 thread1.callAndAssertWaits(waitFor(), guard);
212 guard.setSatisfied(true);
218 TestGuard guard = new TestGuard(true);
219 thread1.callAndAssertThrows(IllegalMonitorStateException.class, waitFor(), guard);
226 .setDefault(Monitor.Guard.class, new TestGuard(true))
231 // TODO: Test enterWhen(Guard, long, TimeUnit).
232 // TODO: Test enterIf(Guard, long, TimeUnit).
233 // TODO: Test waitFor(Guard, long, TimeUnit).
236 // TODO: Test getWaitQueueLength(Guard).
240 // TODO: Test multiple waiters: If guard is still satisfied, signal next waiter.
241 // TODO: Test multiple waiters: If guard is no longer satisfied, do not signal next waiter.