188 |
|
sync.release(1); |
189 |
|
Thread.sleep(SHORT_DELAY_MS); |
190 |
|
assertFalse(sync.isQueued(t1)); |
191 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
192 |
|
assertFalse(sync.isQueued(t2)); |
193 |
|
t1.join(); |
194 |
|
t2.join(); |
215 |
|
assertEquals(t1, sync.getFirstQueuedThread()); |
216 |
|
t1.interrupt(); |
217 |
|
Thread.sleep(SHORT_DELAY_MS); |
218 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
219 |
|
assertEquals(t2, sync.getFirstQueuedThread()); |
220 |
|
sync.release(1); |
221 |
|
Thread.sleep(SHORT_DELAY_MS); |
950 |
|
sync.acquire(1); |
951 |
|
c.signal(); |
952 |
|
sync.release(1); |
951 |
– |
assert(t.isInterrupted()); |
953 |
|
t.join(SHORT_DELAY_MS); |
954 |
|
assertFalse(t.isAlive()); |
955 |
|
} |