215 |
|
lock.writeLock().lock(); |
216 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
217 |
|
public void realRun() throws InterruptedException { |
218 |
< |
lock.writeLock().tryLock(1000,MILLISECONDS); |
218 |
> |
lock.writeLock().tryLock(SMALL_DELAY_MS, MILLISECONDS); |
219 |
|
}}); |
220 |
|
|
221 |
|
t.start(); |
222 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
223 |
|
t.interrupt(); |
224 |
|
lock.writeLock().unlock(); |
225 |
|
t.join(); |
252 |
|
lock.writeLock().lock(); |
253 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
254 |
|
public void realRun() throws InterruptedException { |
255 |
< |
lock.readLock().tryLock(1000,MILLISECONDS); |
255 |
> |
lock.readLock().tryLock(LONG_DELAY_MS, MILLISECONDS); |
256 |
|
}}); |
257 |
|
|
258 |
|
t.start(); |
259 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
260 |
|
t.interrupt(); |
261 |
|
t.join(); |
262 |
|
} |
899 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
900 |
|
public void realRun() throws InterruptedException { |
901 |
|
lock.writeLock().lock(); |
902 |
< |
c.awaitNanos(SHORT_DELAY_MS * 2 * 1000000); |
902 |
> |
c.awaitNanos(MILLISECONDS.toNanos(LONG_DELAY_MS)); |
903 |
|
lock.writeLock().unlock(); |
904 |
|
}}); |
905 |
|
|