292 |
|
running.countDown(); |
293 |
|
lock.writeLockInterruptibly(); |
294 |
|
}}); |
295 |
< |
try { |
296 |
< |
running.await(); |
295 |
> |
try { |
296 |
> |
running.await(); |
297 |
|
waitForThreadToEnterWaitState(t, 100); |
298 |
|
t.interrupt(); |
299 |
|
awaitTermination(t); |
315 |
|
running.countDown(); |
316 |
|
lock.tryWriteLock(2 * LONG_DELAY_MS, MILLISECONDS); |
317 |
|
}}); |
318 |
< |
try { |
318 |
> |
try { |
319 |
|
running.await(); |
320 |
|
waitForThreadToEnterWaitState(t, 100); |
321 |
|
t.interrupt(); |
338 |
|
running.countDown(); |
339 |
|
lock.readLockInterruptibly(); |
340 |
|
}}); |
341 |
< |
try { |
342 |
< |
running.await(); |
341 |
> |
try { |
342 |
> |
running.await(); |
343 |
|
waitForThreadToEnterWaitState(t, 100); |
344 |
|
t.interrupt(); |
345 |
|
awaitTermination(t); |
361 |
|
running.countDown(); |
362 |
|
lock.tryReadLock(2 * LONG_DELAY_MS, MILLISECONDS); |
363 |
|
}}); |
364 |
< |
try { |
365 |
< |
running.await(); |
364 |
> |
try { |
365 |
> |
running.await(); |
366 |
|
waitForThreadToEnterWaitState(t, 100); |
367 |
|
t.interrupt(); |
368 |
|
awaitTermination(t); |
452 |
|
long s = lock.writeLock(); |
453 |
|
lock.unlockWrite(s); |
454 |
|
}}); |
455 |
< |
try { |
456 |
< |
running.await(); |
455 |
> |
try { |
456 |
> |
running.await(); |
457 |
|
waitForThreadToEnterWaitState(t, 100); |
458 |
|
assertFalse(lock.isWriteLocked()); |
459 |
|
lock.unlockRead(rs); |
576 |
|
assertEquals(rs, 0L); |
577 |
|
assertTrue(millisElapsedSince(startTime) >= timeoutMillis); |
578 |
|
}}); |
579 |
< |
|
579 |
> |
|
580 |
|
awaitTermination(t); |
581 |
|
assertTrue(lock.isWriteLocked()); |
582 |
|
lock.unlockWrite(s); |
600 |
|
lock.writeLockInterruptibly(); |
601 |
|
}}); |
602 |
|
|
603 |
< |
try { |
604 |
< |
running.await(); |
603 |
> |
try { |
604 |
> |
running.await(); |
605 |
|
waitForThreadToEnterWaitState(t, 100); |
606 |
|
t.interrupt(); |
607 |
|
assertTrue(lock.isWriteLocked()); |
632 |
|
running.countDown(); |
633 |
|
lock.readLockInterruptibly(); |
634 |
|
}}); |
635 |
< |
try { |
635 |
> |
try { |
636 |
|
running.await(); |
637 |
|
waitForThreadToEnterWaitState(t, 100); |
638 |
|
t.interrupt(); |
743 |
|
running.countDown(); |
744 |
|
lock.writeLockInterruptibly(); |
745 |
|
}}); |
746 |
< |
try { |
746 |
> |
try { |
747 |
|
running.await(); |
748 |
|
assertFalse(lock.validate(p)); |
749 |
|
assertFalse((p = lock.tryOptimisticRead()) != 0L); |